<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Generic (owl.Owl_dense_ndarray.Generic)</title><link rel="stylesheet" href="../../../odoc.css"/><meta charset="utf-8"/><meta name="generator" content="odoc %%VERSION%%"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><div class="content"><header><nav><a href="../index.html">Up</a> – <a href="../../index.html">owl</a> &#x00BB; <a href="../index.html">Owl_dense_ndarray</a> &#x00BB; Generic</nav><h1>Module <code>Owl_dense_ndarray.Generic</code></h1></header><div><div class="spec include"><div class="doc"><details open="open"><summary><span class="def"><code><span class="keyword">include</span> <a href="../../Owl_dense_ndarray_generic/index.html">Owl_dense_ndarray_generic</a></code></span></summary><aside><p>About the comparison of two complex numbers ``x`` and ``y``, Owl uses the following conventions: 1) ``x`` and ``y`` are equal iff both real and imaginary parts are equal; 2) ``x`` is less than ``y`` if the magnitude of ``x`` is less than the magnitude of ``y``; in case both ``x`` and ``y`` have the same magnitudes, ``x`` is less than ``y`` if the phase of ``x`` is less than the phase of ``y``; 3) less or equal, greater, greater or equal relation can be further defined atop of the aforementioned conventions.</p></aside><section><header><h6 id="type-definition"><a href="#type-definition" class="anchor"></a>Type definition</h6></header><dl><dt class="spec type" id="type-t"><a href="#type-t" class="anchor"></a><code><span class="keyword">type</span> <span>('a, 'b) t</span></code><code> = <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>, Stdlib.Bigarray.c_layout)</span> Stdlib.Bigarray.Genarray.t</span></code></dt><dd><p>N-dimensional array type, i.e. Bigarray Genarray type.</p></dd></dl><dl><dt class="spec type" id="type-kind"><a href="#type-kind" class="anchor"></a><code><span class="keyword">type</span> <span>('a, 'b) kind</span></code><code> = <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> Stdlib.Bigarray.kind</span></code></dt><dd><p>Type of the ndarray, e.g., Bigarray.Float32, Bigarray.Complex64, and etc.</p></dd></dl></section><section><header><h6 id="create-ndarrays"><a href="#create-ndarrays" class="anchor"></a>Create Ndarrays</h6></header><dl><dt class="spec value" id="val-empty"><a href="#val-empty" class="anchor"></a><code><span class="keyword">val</span> empty : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-kind">kind</a></span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``empty Bigarray.Float64 <code>|3;4;5|</code>`` creates a three diemensional array of ``Bigarray.Float64`` type. Each dimension has the following size: 3, 4, and 5. The elements in the array are not initialised, they can be any value. ``empty`` is faster than ``zeros`` to create a ndarray.</p><p>The module only supports the following four types of ndarray: ``Bigarray.Float32``, ``Bigarray.Float64``, ``Bigarray.Complex32``, and ``Bigarray.Complex64``.</p></dd></dl><dl><dt class="spec value" id="val-create"><a href="#val-create" class="anchor"></a><code><span class="keyword">val</span> create : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-kind">kind</a></span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``create Bigarray.Float64 <code>|3;4;5|</code> 2.`` creates a three-diemensional array of ``Bigarray.Float64`` type. Each dimension has the following size: 3, 4, and 5. The elements in the array are initialised to ``2.``</p></dd></dl><dl><dt class="spec value" id="val-init"><a href="#val-init" class="anchor"></a><code><span class="keyword">val</span> init : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-kind">kind</a></span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span>(int <span>&#45;&gt;</span> <span class="type-var">'a</span>)</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``init Bigarray.Float64 d f`` creates a ndarray ``x`` of shape ``d``, then using ``f`` to initialise the elements in ``x``. The input of ``f`` is 1-dimensional index of the ndarray. You need to explicitly convert it if you need N-dimensional index. The function ``ind`` can help you.</p></dd></dl><dl><dt class="spec value" id="val-init_nd"><a href="#val-init_nd" class="anchor"></a><code><span class="keyword">val</span> init_nd : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-kind">kind</a></span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span>(<span>int array</span> <span>&#45;&gt;</span> <span class="type-var">'a</span>)</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``init_nd`` is almost the same as ``init`` but ``f`` receives n-dimensional index as input. It is more convenient since you don't have to convert the index by yourself, but this also means ``init_nd`` is slower than ``init``.</p></dd></dl><dl><dt class="spec value" id="val-zeros"><a href="#val-zeros" class="anchor"></a><code><span class="keyword">val</span> zeros : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-kind">kind</a></span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``zeros Bigarray.Complex32 <code>|3;4;5|</code>`` creates a three-diemensional array of ``Bigarray.Complex32`` type. Each dimension has the following size: 3, 4, and 5. The elements in the array are initialised to &quot;zero&quot;. Depending on the ``kind``, zero can be ``0.`` or ``Complex.zero``.</p></dd></dl><dl><dt class="spec value" id="val-ones"><a href="#val-ones" class="anchor"></a><code><span class="keyword">val</span> ones : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-kind">kind</a></span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``ones Bigarray.Complex32 <code>|3;4;5|</code>`` creates a three-diemensional array of ``Bigarray.Complex32`` type. Each dimension has the following size: 3, 4, and 5. The elements in the array are initialised to &quot;one&quot;. Depending on the ``kind``, one can be ``1.`` or ``Complex.one``.</p></dd></dl><dl><dt class="spec value" id="val-eye"><a href="#val-eye" class="anchor"></a><code><span class="keyword">val</span> eye : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-kind">kind</a></span> <span>&#45;&gt;</span> int <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``eye m`` creates an ``m`` by ``m`` identity matrix.</p></dd></dl><dl><dt class="spec value" id="val-uniform"><a href="#val-uniform" class="anchor"></a><code><span class="keyword">val</span> uniform : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-kind">kind</a></span> <span>&#45;&gt;</span> <span>?&#8288;a:<span class="type-var">'a</span></span> <span>&#45;&gt;</span> <span>?&#8288;b:<span class="type-var">'a</span></span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``uniform Bigarray.Float64 <code>|3;4;5|</code>`` creates a three-diemensional array of type ``Bigarray.Float64``. Each dimension has the following size: 3, 4, and 5. The elements in the array follow a uniform distribution ``0,1``.</p></dd></dl><dl><dt class="spec value" id="val-gaussian"><a href="#val-gaussian" class="anchor"></a><code><span class="keyword">val</span> gaussian : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-kind">kind</a></span> <span>&#45;&gt;</span> <span>?&#8288;mu:<span class="type-var">'a</span></span> <span>&#45;&gt;</span> <span>?&#8288;sigma:<span class="type-var">'a</span></span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``gaussian Float64 <code>|3;4;5|</code>`` ...</p></dd></dl><dl><dt class="spec value" id="val-sequential"><a href="#val-sequential" class="anchor"></a><code><span class="keyword">val</span> sequential : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-kind">kind</a></span> <span>&#45;&gt;</span> <span>?&#8288;a:<span class="type-var">'a</span></span> <span>&#45;&gt;</span> <span>?&#8288;step:<span class="type-var">'a</span></span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``sequential Bigarray.Float64 <code>|3;4;5|</code> 2.`` creates a three-diemensional array of type ``Bigarray.Float64``. Each dimension has the following size: 3, 4, and 5. The elements in the array are assigned sequential values.</p><p>``?a`` specifies the starting value and the default value is zero; whilst ``?step`` specifies the step size with default value one.</p></dd></dl><dl><dt class="spec value" id="val-linspace"><a href="#val-linspace" class="anchor"></a><code><span class="keyword">val</span> linspace : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-kind">kind</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> int <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``linspace k 0. 9. 10`` ...</p></dd></dl><dl><dt class="spec value" id="val-logspace"><a href="#val-logspace" class="anchor"></a><code><span class="keyword">val</span> logspace : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-kind">kind</a></span> <span>&#45;&gt;</span> <span>?&#8288;base:float</span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> int <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``logspace k 0. 9. 10`` ...</p></dd></dl><dl><dt class="spec value" id="val-bernoulli"><a href="#val-bernoulli" class="anchor"></a><code><span class="keyword">val</span> bernoulli : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-kind">kind</a></span> <span>&#45;&gt;</span> <span>?&#8288;p:float</span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``bernoulli k ~p:0.3 <code>|2;3;4|</code>``</p></dd></dl><dl><dt class="spec value" id="val-complex"><a href="#val-complex" class="anchor"></a><code><span class="keyword">val</span> complex : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-kind">kind</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'c</span>, <span class="type-var">'d</span>)</span> <a href="index.html#type-kind">kind</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'c</span>, <span class="type-var">'d</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``complex re im`` constructs a complex ndarray/matrix from ``re`` and ``im``. ``re`` and ``im`` contain the real and imaginary part of ``x`` respectively.</p><p>Note that both ``re`` and ``im`` can be complex but must have same type. The real part of ``re`` will be the real part of ``x`` and the imaginary part of ``im`` will be the imaginary part of ``x``.</p></dd></dl><dl><dt class="spec value" id="val-polar"><a href="#val-polar" class="anchor"></a><code><span class="keyword">val</span> polar : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-kind">kind</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'c</span>, <span class="type-var">'d</span>)</span> <a href="index.html#type-kind">kind</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'c</span>, <span class="type-var">'d</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``complex rho theta`` constructs a complex ndarray/matrix from polar coordinates ``rho`` and ``theta``. ``rho`` contains the magnitudes and ``theta`` contains phase angles. Note that the behaviour is undefined if ``rho`` has negative elelments or ``theta`` has infinity elelments.</p></dd></dl><dl><dt class="spec value" id="val-unit_basis"><a href="#val-unit_basis" class="anchor"></a><code><span class="keyword">val</span> unit_basis : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-kind">kind</a></span> <span>&#45;&gt;</span> int <span>&#45;&gt;</span> int <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``unit_basis k n i`` returns a unit basis vector with ``i``th element set to 1.</p></dd></dl></section><section><header><h6 id="obtain-basic-properties"><a href="#obtain-basic-properties" class="anchor"></a>Obtain basic properties</h6></header><dl><dt class="spec value" id="val-shape"><a href="#val-shape" class="anchor"></a><code><span class="keyword">val</span> shape : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span>int array</span></code></dt><dd><p>``shape x`` returns the shape of ndarray ``x``.</p></dd></dl><dl><dt class="spec value" id="val-num_dims"><a href="#val-num_dims" class="anchor"></a><code><span class="keyword">val</span> num_dims : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> int</code></dt><dd><p>``num_dims x`` returns the number of dimensions of ndarray ``x``.</p></dd></dl><dl><dt class="spec value" id="val-nth_dim"><a href="#val-nth_dim" class="anchor"></a><code><span class="keyword">val</span> nth_dim : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> int <span>&#45;&gt;</span> int</code></dt><dd><p>``nth_dim x`` returns the size of the nth dimension of ``x``.</p></dd></dl><dl><dt class="spec value" id="val-numel"><a href="#val-numel" class="anchor"></a><code><span class="keyword">val</span> numel : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> int</code></dt><dd><p>``numel x`` returns the number of elements in ``x``.</p></dd></dl><dl><dt class="spec value" id="val-nnz"><a href="#val-nnz" class="anchor"></a><code><span class="keyword">val</span> nnz : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> int</code></dt><dd><p>``nnz x`` returns the number of non-zero elements in ``x``.</p></dd></dl><dl><dt class="spec value" id="val-density"><a href="#val-density" class="anchor"></a><code><span class="keyword">val</span> density : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> float</code></dt><dd><p>``density x`` returns the percentage of non-zero elements in ``x``.</p></dd></dl><dl><dt class="spec value" id="val-size_in_bytes"><a href="#val-size_in_bytes" class="anchor"></a><code><span class="keyword">val</span> size_in_bytes : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> int</code></dt><dd><p>``size_in_bytes x`` returns the size of ``x`` in bytes in memory.</p></dd></dl><dl><dt class="spec value" id="val-same_shape"><a href="#val-same_shape" class="anchor"></a><code><span class="keyword">val</span> same_shape : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'c</span>, <span class="type-var">'d</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> bool</code></dt><dd><p>``same_shape x y`` checks whether ``x`` and ``y`` has the same shape or not.</p></dd></dl><dl><dt class="spec value" id="val-same_data"><a href="#val-same_data" class="anchor"></a><code><span class="keyword">val</span> same_data : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> bool</code></dt><dd><p>``same_data x y`` checks whether ``x`` and ``y`` share the same underlying data in the memory. Namely, both variables point to the same memory address. This is done by checking the ``Data`` pointer in the Bigarray structure.</p><p>This function is very useful for avoiding unnecessary copying between two ndarrays especially if one has been reshaped or sliced.</p></dd></dl><dl><dt class="spec value" id="val-kind"><a href="#val-kind" class="anchor"></a><code><span class="keyword">val</span> kind : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-kind">kind</a></span></code></dt><dd><p>``kind x`` returns the type of ndarray ``x``. It is one of the four possible values: ``Bigarray.Float32``, ``Bigarray.Float64``, ``Bigarray.Complex32``, and ``Bigarray.Complex64``.</p></dd></dl><dl><dt class="spec value" id="val-strides"><a href="#val-strides" class="anchor"></a><code><span class="keyword">val</span> strides : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span>int array</span></code></dt><dd><p>``strides x`` calculates the strides of ``x``. E.g., if ``x`` is of shape ``<code>|3;4;5|</code>``, the returned strides will be ``<code>|20;5;1|</code>``.</p></dd></dl><dl><dt class="spec value" id="val-slice_size"><a href="#val-slice_size" class="anchor"></a><code><span class="keyword">val</span> slice_size : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span>int array</span></code></dt><dd><p>``slice_size`` calculates the slice size in each dimension, E.g., if ``x`` is of shape ``<code>|3;4;5|</code>``, the returned slice size will be ``<code>|60; 20; 5|</code>``.</p></dd></dl><dl><dt class="spec value" id="val-ind"><a href="#val-ind" class="anchor"></a><code><span class="keyword">val</span> ind : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> int <span>&#45;&gt;</span> <span>int array</span></code></dt><dd><p>``ind x i`` converts ``x``'s one-dimensional index ``i`` to n-dimensional one.</p></dd></dl><dl><dt class="spec value" id="val-i1d"><a href="#val-i1d" class="anchor"></a><code><span class="keyword">val</span> i1d : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> int</code></dt><dd><p>``i1d x i`` converts ``x``'s n-dimensional index ``i`` to one-dimensional one.</p></dd></dl></section><section><header><h6 id="manipulate-ndarrays"><a href="#manipulate-ndarrays" class="anchor"></a>Manipulate Ndarrays</h6></header><dl><dt class="spec value" id="val-get"><a href="#val-get" class="anchor"></a><code><span class="keyword">val</span> get : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span class="type-var">'a</span></code></dt><dd><p>``get x i`` returns the value at ``i`` in ``x``. E.g., ``get x <code>|0;2;1|</code>`` returns the value at ``<code>|0;2;1|</code>`` in ``x``.</p></dd></dl><dl><dt class="spec value" id="val-set"><a href="#val-set" class="anchor"></a><code><span class="keyword">val</span> set : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``set x i a`` sets the value at ``i`` to ``a`` in ``x``.</p></dd></dl><dl><dt class="spec value" id="val-get_index"><a href="#val-get_index" class="anchor"></a><code><span class="keyword">val</span> get_index : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>int array</span> array</span> <span>&#45;&gt;</span> <span><span class="type-var">'a</span> array</span></code></dt><dd><p>``get_index i x`` returns an array of element values specified by the indices ``i``. The length of array ``i`` equals the number of dimensions of ``x``. The arrays in ``i`` must have the same length, and each represents the indices in that dimension.</p><p>E.g., ``<code>| [|1;2|]; [|3;4|] |</code>`` returns the value of elements at position ``(1,3)`` and ``(2,4)`` respectively.</p></dd></dl><dl><dt class="spec value" id="val-set_index"><a href="#val-set_index" class="anchor"></a><code><span class="keyword">val</span> set_index : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>int array</span> array</span> <span>&#45;&gt;</span> <span><span class="type-var">'a</span> array</span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``set_index i x a`` sets the value of elements in ``x`` according to the indices specified by ``i``. The length of array ``i`` equals the number of dimensions of ``x``. The arrays in ``i`` must have the same length, and each represents the indices in that dimension.</p><p>If the length of ``a`` equals to the length of ``i``, then each element will be assigned by the value in the corresponding position in ``x``. If the length of ``a`` equals to one, then all the elements will be assigned the same value.</p></dd></dl><dl><dt class="spec value" id="val-get_fancy"><a href="#val-get_fancy" class="anchor"></a><code><span class="keyword">val</span> get_fancy : <span><a href="../../../owl-base/Owl_types/index.html#type-index">Owl_types.index</a> list</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``get_fancy s x`` returns a copy of the slice in ``x``. The slice is defined by ``a`` which is an ``int option array``. E.g., for a ndarray ``x`` of dimension ``<code>|2; 2; 3|</code>``, ``slice <code>0</code> x`` takes the following slices of index ``\(0,*,*\)``, i.e., ``<code>|0;0;0|</code>``, ``<code>|0;0;1|</code>``, ``<code>|0;0;2|</code>`` ... Also note that if the length of ``s`` is less than the number of dimensions of ``x``, ``slice`` function will append slice definition to higher diemensions by assuming all the elements in missing dimensions will be taken.</p><p>Basically, ``slice`` function offers very much the same semantic as that in numpy, i.e., start:stop:step grammar, so if you how to index and slice ndarray in numpy, you should not find it difficult to use this function. Please just refer to numpy documentation or my tutorial.</p><p>There are two differences between ``slice_left`` and ``slice``: ``slice_left`` does not make a copy but simply moving the pointer; ``slice_left`` can only make a slice from left-most axis whereas ``slice`` is much more flexible and can work on arbitrary axis which need not start from left-most side.</p></dd></dl><dl><dt class="spec value" id="val-set_fancy"><a href="#val-set_fancy" class="anchor"></a><code><span class="keyword">val</span> set_fancy : <span><a href="../../../owl-base/Owl_types/index.html#type-index">Owl_types.index</a> list</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``set_fancy axis x y`` set the slice defined by ``axis`` in ``x`` according to the values in ``y``. ``y`` must have the same shape as the one defined by ``axis``.</p><p>About the slice definition of ``axis``, please refer to ``get_fancy`` function.</p></dd></dl><dl><dt class="spec value" id="val-get_slice"><a href="#val-get_slice" class="anchor"></a><code><span class="keyword">val</span> get_slice : <span><span>int list</span> list</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``get_slice axis x`` aims to provide a simpler version of ``get_fancy``. This function assumes that every list element in the passed in ``int list list`` represents a range, i.e., ``R`` constructor.</p><p>E.g., ``<code>[];[0;3];[0]</code>`` is equivalent to ``<code>R []; R [0;3]; R [0]</code>``.</p></dd></dl><dl><dt class="spec value" id="val-set_slice"><a href="#val-set_slice" class="anchor"></a><code><span class="keyword">val</span> set_slice : <span><span>int list</span> list</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``set_slice axis x y`` aims to provide a simpler version of ``set_fancy``. This function assumes that every list element in the passed in ``int list list`` represents a range, i.e., ``R`` constructor.</p><p>E.g., ``<code>[];[0;3];[0]</code>`` is equivalent to ``<code>R []; R [0;3]; R [0]</code>``.</p></dd></dl><dl><dt class="spec value" id="val-sub_left"><a href="#val-sub_left" class="anchor"></a><code><span class="keyword">val</span> sub_left : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> int <span>&#45;&gt;</span> int <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>Some as ``Bigarray.sub_left``, please refer to Bigarray documentation.</p></dd></dl><dl><dt class="spec value" id="val-sub_ndarray"><a href="#val-sub_ndarray" class="anchor"></a><code><span class="keyword">val</span> sub_ndarray : <span>int array</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> array</span></code></dt><dd><p>``sub_ndarray parts x`` is similar to ``Bigarray.sub_left``. It splits the passed in ndarray ``x`` along the ``axis 0`` according to ``parts``. The elelments in ``parts`` do not need to be equal but they must sum up to the dimension along axis zero.</p><p>The returned sub-ndarrays share the same memory as ``x``. Because there is no copies made, this function is much faster than using `split` function to divide the lowest dimensionality of ``x``.</p></dd></dl><dl><dt class="spec value" id="val-slice_left"><a href="#val-slice_left" class="anchor"></a><code><span class="keyword">val</span> slice_left : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>Same as ``Bigarray.slice_left``, please refer to Bigarray documentation.</p></dd></dl><dl><dt class="spec value" id="val-reset"><a href="#val-reset" class="anchor"></a><code><span class="keyword">val</span> reset : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``reset x`` resets all the elements in ``x`` to zero.</p></dd></dl><dl><dt class="spec value" id="val-fill"><a href="#val-fill" class="anchor"></a><code><span class="keyword">val</span> fill : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``fill x a`` assigns the value ``a`` to the elements in ``x``.</p></dd></dl><dl><dt class="spec value" id="val-copy"><a href="#val-copy" class="anchor"></a><code><span class="keyword">val</span> copy : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``copy x`` makes a copy of ``x``.</p></dd></dl><dl><dt class="spec value" id="val-resize"><a href="#val-resize" class="anchor"></a><code><span class="keyword">val</span> resize : <span>?&#8288;head:bool</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``resize ~head x d`` resizes the ndarray ``x``. If there are less number of elelments in the new shape than the old one, the new ndarray shares part of the memeory with the old ``x``. ``head`` indicates the alignment between the new and old data, either from head or from tail. Note the data is flattened before the operation.</p><p>If there are more elements in the new shape ``d``. Then new memeory space will be allocated and the content of ``x`` will be copied to the new memory. The rest of the allocated space will be filled with zeros. The default value of ``head`` is ``true``.</p></dd></dl><dl><dt class="spec value" id="val-reshape"><a href="#val-reshape" class="anchor"></a><code><span class="keyword">val</span> reshape : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``reshape x d`` transforms ``x`` into a new shape definted by ``d``. Note the ``reshape`` function will not make a copy of ``x``, the returned ndarray shares the same memory with the original ``x``.</p><p>One shape dimension (only one) can be set to ``-1``. In this case, the value is inferred from the length of the array and remaining dimensions.</p></dd></dl><dl><dt class="spec value" id="val-flatten"><a href="#val-flatten" class="anchor"></a><code><span class="keyword">val</span> flatten : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``flatten x`` transforms ``x`` into a one-dimsonal array without making a copy. Therefore the returned value shares the same memory space with original ``x``.</p></dd></dl><dl><dt class="spec value" id="val-reverse"><a href="#val-reverse" class="anchor"></a><code><span class="keyword">val</span> reverse : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``reverse x`` reverse the order of all elements in the flattened ``x`` and returns the results in a new ndarray. The original ``x`` remains intact.</p></dd></dl><dl><dt class="spec value" id="val-flip"><a href="#val-flip" class="anchor"></a><code><span class="keyword">val</span> flip : <span>?&#8288;axis:int</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``flip ~axis x`` flips a matrix/ndarray along ``axis``. By default ``axis = 0``. The result is returned in a new matrix/ndarray, so the original ``x`` remains intact.</p></dd></dl><dl><dt class="spec value" id="val-rotate"><a href="#val-rotate" class="anchor"></a><code><span class="keyword">val</span> rotate : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> int <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``rotate x d`` rotates ``x`` clockwise ``d`` degrees. ``d`` must be multiple times of ``90``, otherwise the function will fail. If ``x`` is an n-dimensional array, then the function rotates the plane formed by the first and second dimensions.</p></dd></dl><dl><dt class="spec value" id="val-transpose"><a href="#val-transpose" class="anchor"></a><code><span class="keyword">val</span> transpose : <span>?&#8288;axis:<span>int array</span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``transpose ~axis x`` makes a copy of ``x``, then transpose it according to ``~axis``. ``~axis`` must be a valid permutation of ``x`` dimension indices. E.g., for a three-dimensional ndarray, it can be ``<code>2;1;0</code>``, ``<code>0;2;1</code>``, ``<code>1;2;0</code>``, and etc.</p></dd></dl><dl><dt class="spec value" id="val-swap"><a href="#val-swap" class="anchor"></a><code><span class="keyword">val</span> swap : int <span>&#45;&gt;</span> int <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``swap i j x`` makes a copy of ``x``, then swaps the data on axis ``i`` and ``j``.</p></dd></dl><dl><dt class="spec value" id="val-tile"><a href="#val-tile" class="anchor"></a><code><span class="keyword">val</span> tile : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``tile x a`` tiles the data in ``x`` according the repetition specified by ``a``. This function provides the exact behaviour as ``numpy.tile``, please refer to the numpy's online documentation for details.</p></dd></dl><dl><dt class="spec value" id="val-repeat"><a href="#val-repeat" class="anchor"></a><code><span class="keyword">val</span> repeat : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``repeat x a`` repeats the elements of ``x`` according the repetition specified by ``a``. The i-th element of ``a`` specifies the number of times that the individual entries of the i-th dimension of ``x`` should be repeated.</p></dd></dl><dl><dt class="spec value" id="val-concat_vertical"><a href="#val-concat_vertical" class="anchor"></a><code><span class="keyword">val</span> concat_vertical : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``concat_vertical x y`` concatenates two ndarray ``x`` and ``y`` vertically. This is just a convenient function for concatenating two ndarrays along their lowest dimension, i.e. 0.</p><p>The associated operator is ``@||``, please refer to :doc:`owl_operator`.</p></dd></dl><dl><dt class="spec value" id="val-concat_horizontal"><a href="#val-concat_horizontal" class="anchor"></a><code><span class="keyword">val</span> concat_horizontal : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``concat_horizontal x y`` concatenates two ndarrays ``x`` and ``y`` horizontally. This is just a convenient function for concatenating two ndarrays along their highest dimension.</p><p>The associated operator is ``@=``, please refer to :doc:`owl_operator`.</p></dd></dl><dl><dt class="spec value" id="val-concat_vh"><a href="#val-concat_vh" class="anchor"></a><code><span class="keyword">val</span> concat_vh : <span><span><span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> array</span> array</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``concat_vh`` is used to assemble small parts of matrices into a bigger one. E.g. In ``<code>| [|a; b; c|]; [|d; e; f|]; [|g; h; i|] |</code>``, wherein `a, b, c ... i` are matrices of different shapes. They will be concatenated into a big matrix as follows.</p><p>.. math:: \begin<b>matrix</b> a &amp; b &amp; c \\ d &amp; e &amp; f \\ g &amp; h &amp; i \end<b>matrix</b></p><p>This is achieved by first concatenating along ``axis:1`` for each element in the array, then concatenating along ``axis:0``. The number of elements in each array needs not to be equal as long as the aggregated dimensions match. E.g., please check the following example.</p><p>.. code-block:: ocaml</p><p>let a00 = Mat.sequential 2 3 in let a01 = Mat.sequential 2 2 in let a02 = Mat.sequential 2 1 in let a10 = Mat.sequential 3 3 in let a11 = Mat.sequential 3 3 in Mat.concat_vh <code>| [|a00; a01; a02|]; [|a10; a11|] |</code>;;</p></dd></dl><dl><dt class="spec value" id="val-concatenate"><a href="#val-concatenate" class="anchor"></a><code><span class="keyword">val</span> concatenate : <span>?&#8288;axis:int</span> <span>&#45;&gt;</span> <span><span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> array</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``concatenate ~axis:2 x`` concatenates an array of ndarrays along the third dimension. For the ndarrays in ``x``, they must have the same shape except the dimension specified by ``axis``. The default value of ``axis`` is 0, i.e., the lowest dimension of a matrix/ndarray.</p></dd></dl><dl><dt class="spec value" id="val-split"><a href="#val-split" class="anchor"></a><code><span class="keyword">val</span> split : <span>?&#8288;axis:int</span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> array</span></code></dt><dd><p>``split ~axis parts x`` splits an ndarray ``x`` into parts along the specified ``axis``. This function is the inverse operation of ``concatenate``. The elements in ``x`` must sum up to the dimension in the specified axis.</p></dd></dl><dl><dt class="spec value" id="val-split_vh"><a href="#val-split_vh" class="anchor"></a><code><span class="keyword">val</span> split_vh : <span><span><span>(int * int)</span> array</span> array</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span><span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> array</span> array</span></code></dt><dd><p>``split_vh parts x`` splits a passed in ndarray ``x`` along the first two dimensions, i.e. ``axis 0`` and ``axis 1``. This is the inverse operation of ``concat_vh`` function, and the function is very useful in dividing a big matrix into smaller (especially heterogeneous) parts.</p><p>For example, given a matrix ``x`` of shape ``<code>|8;10|</code>``, it is possible to split in the following ways.</p><p>.. code-block:: ocaml</p><p>Mat.split_vh <code>| [|(8,5);(8,5)|] |</code> x;; Mat.split_vh <code>| [|(4,5);(4,5)|]; [|(4,10)|] |</code> x;; Mat.split_vh <code>| [|(4,5);(4,5)|]; [|(4,5);(4,5)|] |</code> x;;</p></dd></dl><dl><dt class="spec value" id="val-squeeze"><a href="#val-squeeze" class="anchor"></a><code><span class="keyword">val</span> squeeze : <span>?&#8288;axis:<span>int array</span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``squeeze ~axis x`` removes single-dimensional entries from the shape of ``x``.</p></dd></dl><dl><dt class="spec value" id="val-expand"><a href="#val-expand" class="anchor"></a><code><span class="keyword">val</span> expand : <span>?&#8288;hi:bool</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> int <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``expand x d`` reshapes ``x`` by increasing its rank from ``num_dims x`` to ``d``. The opposite operation is ``squeeze x``. The ``hi`` parameter is used to specify whether the expandsion is along high dimension (by setting ``true``), or along the low dimension (by setting ``false``). The default value is ``false``.</p></dd></dl><dl><dt class="spec value" id="val-pad"><a href="#val-pad" class="anchor"></a><code><span class="keyword">val</span> pad : <span>?&#8288;v:<span class="type-var">'a</span></span> <span>&#45;&gt;</span> <span><span>int list</span> list</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``pad ~v p x`` pads a ndarray ``x`` with a constant value ``v``. The padding index ``p`` is a list of lists of 2 integers. These two integers denote padding width at both edges of one dimension of ``x``.</p></dd></dl><dl><dt class="spec value" id="val-dropout"><a href="#val-dropout" class="anchor"></a><code><span class="keyword">val</span> dropout : <span>?&#8288;rate:float</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``dropout ~rate:0.3 x`` drops out 30% of the elements in ``x``, in other words, by setting their values to zeros.</p></dd></dl><dl><dt class="spec value" id="val-top"><a href="#val-top" class="anchor"></a><code><span class="keyword">val</span> top : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> int <span>&#45;&gt;</span> <span><span>int array</span> array</span></code></dt><dd><p>``top x n`` returns the indices of ``n`` greatest values of ``x``. The indices are arranged according to the corresponding element values, from the greatest one to the smallest one.</p></dd></dl><dl><dt class="spec value" id="val-bottom"><a href="#val-bottom" class="anchor"></a><code><span class="keyword">val</span> bottom : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> int <span>&#45;&gt;</span> <span><span>int array</span> array</span></code></dt><dd><p>``bottom x n`` returns the indices of ``n`` smallest values of ``x``. The indices are arranged according to the corresponding element values, from the smallest one to the greatest one.</p></dd></dl><dl><dt class="spec value" id="val-sort1"><a href="#val-sort1" class="anchor"></a><code><span class="keyword">val</span> sort1 : <span>?&#8288;axis:int</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``sort1 ~axis x`` performs quicksort of the elements along specific ``axis`` in ``x``. A new copy is returned as result, the original ``x`` remains intact.</p></dd></dl><dl><dt class="spec value" id="val-sort"><a href="#val-sort" class="anchor"></a><code><span class="keyword">val</span> sort : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``sort x`` performs quicksort of the elelments in ``x``. A new copy is returned as result, the original ``x`` remains intact. If you want to perform in-place sorting, please use `sort_` instead.</p></dd></dl><dl><dt class="spec value" id="val-argsort"><a href="#val-argsort" class="anchor"></a><code><span class="keyword">val</span> argsort : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(int64, Stdlib.Bigarray.int64_elt)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``argsort x`` returns the indices with which the elements in ``x`` are sorted in increasing order. Note that the returned index ndarray has the same shape as that of ``x``, and the indices are 1D indices.</p></dd></dl><dl><dt class="spec value" id="val-draw"><a href="#val-draw" class="anchor"></a><code><span class="keyword">val</span> draw : <span>?&#8288;axis:int</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> int <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> * <span>int array</span></code></dt><dd><p>``draw ~axis x n`` draws ``n`` samples from ``x`` along the specified ``axis``, with replacement. ``axis`` is set to zero by default. The return is a tuple of both samples and the indices of the selected samples.</p></dd></dl><dl><dt class="spec value" id="val-mmap"><a href="#val-mmap" class="anchor"></a><code><span class="keyword">val</span> mmap : Unix.file_descr <span>&#45;&gt;</span> <span>?&#8288;pos:int64</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-kind">kind</a></span> <span>&#45;&gt;</span> bool <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``mmap fd kind layout shared dims`` ...</p></dd></dl></section><section><header><h6 id="iteration-functions"><a href="#iteration-functions" class="anchor"></a>Iteration functions</h6></header><dl><dt class="spec value" id="val-iteri"><a href="#val-iteri" class="anchor"></a><code><span class="keyword">val</span> iteri : <span>(int <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> unit)</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``iteri f x`` applies function ``f`` to each element in ``x``. Note that 1d index is passed to function ``f``, you need to convert it to nd-index by yourself.</p></dd></dl><dl><dt class="spec value" id="val-iter"><a href="#val-iter" class="anchor"></a><code><span class="keyword">val</span> iter : <span>(<span class="type-var">'a</span> <span>&#45;&gt;</span> unit)</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``iter f x`` is similar to ``iteri f x``, excpet the index is not passed to ``f``.</p></dd></dl><dl><dt class="spec value" id="val-mapi"><a href="#val-mapi" class="anchor"></a><code><span class="keyword">val</span> mapi : <span>(int <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> <span class="type-var">'a</span>)</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``mapi f x`` makes a copy of ``x``, then applies ``f`` to each element in ``x``.</p></dd></dl><dl><dt class="spec value" id="val-map"><a href="#val-map" class="anchor"></a><code><span class="keyword">val</span> map : <span>(<span class="type-var">'a</span> <span>&#45;&gt;</span> <span class="type-var">'a</span>)</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``map f x`` is similar to ``mapi f x`` except the index is not passed.</p></dd></dl><dl><dt class="spec value" id="val-foldi"><a href="#val-foldi" class="anchor"></a><code><span class="keyword">val</span> foldi : <span>?&#8288;axis:int</span> <span>&#45;&gt;</span> <span>(int <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> <span class="type-var">'a</span>)</span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``foldi ~axis f a x`` folds (or reduces) the elements in ``x`` from left along the specified ``axis`` using passed in function ``f``. ``a`` is the initial element and in ``f i acc b`` ``acc`` is the accumulater and ``b`` is one of the elemets in ``x`` along the same axis. Note that ``i`` is 1d index of ``b``.</p></dd></dl><dl><dt class="spec value" id="val-fold"><a href="#val-fold" class="anchor"></a><code><span class="keyword">val</span> fold : <span>?&#8288;axis:int</span> <span>&#45;&gt;</span> <span>(<span class="type-var">'a</span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> <span class="type-var">'a</span>)</span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>Similar to ``foldi``, except that the index of an element is not passed to ``f``.</p></dd></dl><dl><dt class="spec value" id="val-scani"><a href="#val-scani" class="anchor"></a><code><span class="keyword">val</span> scani : <span>?&#8288;axis:int</span> <span>&#45;&gt;</span> <span>(int <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> <span class="type-var">'a</span>)</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``scan ~axis f x`` scans the ``x`` along the specified ``axis`` using passed in function ``f``. ``f acc a b`` returns an updated ``acc`` which will be passed in the next call to ``f i acc a``. This function can be used to implement accumulative operations such as ``sum`` and ``prod`` functions. Note that the ``i`` is 1d index of ``a`` in ``x``.</p></dd></dl><dl><dt class="spec value" id="val-scan"><a href="#val-scan" class="anchor"></a><code><span class="keyword">val</span> scan : <span>?&#8288;axis:int</span> <span>&#45;&gt;</span> <span>(<span class="type-var">'a</span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> <span class="type-var">'a</span>)</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>Similar to ``scani``, except that the index of an element is not passed to ``f``.</p></dd></dl><dl><dt class="spec value" id="val-filteri"><a href="#val-filteri" class="anchor"></a><code><span class="keyword">val</span> filteri : <span>(int <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> bool)</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span>int array</span></code></dt><dd><p>``filteri f x`` uses ``f`` to filter out certain elements in ``x``. An element will be included if ``f`` returns ``true``. The returned result is an array of 1-dimensional indices of the selected elements. To obtain the n-dimensional indices, you need to convert it manulally with Owl's helper function.</p></dd></dl><dl><dt class="spec value" id="val-filter"><a href="#val-filter" class="anchor"></a><code><span class="keyword">val</span> filter : <span>(<span class="type-var">'a</span> <span>&#45;&gt;</span> bool)</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span>int array</span></code></dt><dd><p>Similar to ``filteri``, but the indices are not passed to ``f``.</p></dd></dl><dl><dt class="spec value" id="val-iter2i"><a href="#val-iter2i" class="anchor"></a><code><span class="keyword">val</span> iter2i : <span>(int <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> <span class="type-var">'b</span> <span>&#45;&gt;</span> unit)</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'c</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'b</span>, <span class="type-var">'d</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>Similar to ``iteri`` but applies to two N-dimensional arrays ``x`` and ``y``. Both ``x`` and ``y`` must have the same shape.</p></dd></dl><dl><dt class="spec value" id="val-iter2"><a href="#val-iter2" class="anchor"></a><code><span class="keyword">val</span> iter2 : <span>(<span class="type-var">'a</span> <span>&#45;&gt;</span> <span class="type-var">'b</span> <span>&#45;&gt;</span> unit)</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'c</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'b</span>, <span class="type-var">'d</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>Similar to ``iter2i``, except that the index not passed to ``f``.</p></dd></dl><dl><dt class="spec value" id="val-map2i"><a href="#val-map2i" class="anchor"></a><code><span class="keyword">val</span> map2i : <span>(int <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> <span class="type-var">'a</span>)</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``map2i f x y`` applies ``f`` to two elements of the same position in both ``x`` and ``y``. Note that 1d index is passed to funciton ``f``.</p></dd></dl><dl><dt class="spec value" id="val-map2"><a href="#val-map2" class="anchor"></a><code><span class="keyword">val</span> map2 : <span>(<span class="type-var">'a</span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> <span class="type-var">'a</span>)</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``map2 f x y`` is similar to ``map2i f x y`` except the index is not passed.</p></dd></dl><dl><dt class="spec value" id="val-iteri_nd"><a href="#val-iteri_nd" class="anchor"></a><code><span class="keyword">val</span> iteri_nd : <span>(<span>int array</span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> unit)</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>Similar to ``iteri`` but n-d indices are passed to the user function.</p></dd></dl><dl><dt class="spec value" id="val-mapi_nd"><a href="#val-mapi_nd" class="anchor"></a><code><span class="keyword">val</span> mapi_nd : <span>(<span>int array</span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> <span class="type-var">'a</span>)</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>Similar to ``mapi`` but n-d indices are passed to the user function.</p></dd></dl><dl><dt class="spec value" id="val-foldi_nd"><a href="#val-foldi_nd" class="anchor"></a><code><span class="keyword">val</span> foldi_nd : <span>?&#8288;axis:int</span> <span>&#45;&gt;</span> <span>(<span>int array</span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> <span class="type-var">'a</span>)</span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>Similar to ``foldi`` but n-d indices are passed to the user function.</p></dd></dl><dl><dt class="spec value" id="val-scani_nd"><a href="#val-scani_nd" class="anchor"></a><code><span class="keyword">val</span> scani_nd : <span>?&#8288;axis:int</span> <span>&#45;&gt;</span> <span>(<span>int array</span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> <span class="type-var">'a</span>)</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>Similar to ``scani`` but n-d indices are passed to the user function.</p></dd></dl><dl><dt class="spec value" id="val-filteri_nd"><a href="#val-filteri_nd" class="anchor"></a><code><span class="keyword">val</span> filteri_nd : <span>(<span>int array</span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> bool)</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>int array</span> array</span></code></dt><dd><p>Similar to ``filteri`` but n-d indices are returned.</p></dd></dl><dl><dt class="spec value" id="val-iter2i_nd"><a href="#val-iter2i_nd" class="anchor"></a><code><span class="keyword">val</span> iter2i_nd : <span>(<span>int array</span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> <span class="type-var">'c</span> <span>&#45;&gt;</span> unit)</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'c</span>, <span class="type-var">'d</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>Similar to ``iter2i`` but n-d indices are passed to the user function.</p></dd></dl><dl><dt class="spec value" id="val-map2i_nd"><a href="#val-map2i_nd" class="anchor"></a><code><span class="keyword">val</span> map2i_nd : <span>(<span>int array</span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> <span class="type-var">'a</span>)</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>Similar to ``map2i`` but n-d indices are passed to the user function.</p></dd></dl><dl><dt class="spec value" id="val-iteri_slice"><a href="#val-iteri_slice" class="anchor"></a><code><span class="keyword">val</span> iteri_slice : <span>?&#8288;axis:int</span> <span>&#45;&gt;</span> <span>(int <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit)</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``iteri_slice ~axis f x`` iterates the slices along the specified ``axis`` in ``x`` and applies the function ``f``. The 1-d index of of the slice is passed in. By default, the ``axis`` is 0. Setting ``axis`` to the highest dimension is not allowed because in that case you can just use `iteri` to iterate all the elements in ``x`` which is more efficient.</p><p>Note that the slice is obtained by slicing left (due to Owl's C-layout ndarray) a sub-array out of ``x``. E.g., if ``x`` has shape ``<code>|3;4;5|</code>``, setting ``axis=0`` will iterate three ``4 x 5`` matrices. The slice shares the same memory with ``x`` so no copy is made.</p></dd></dl><dl><dt class="spec value" id="val-iter_slice"><a href="#val-iter_slice" class="anchor"></a><code><span class="keyword">val</span> iter_slice : <span>?&#8288;axis:int</span> <span>&#45;&gt;</span> <span>(<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit)</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>Similar to ``iteri_slice`` but slice index is not passed in.</p></dd></dl><dl><dt class="spec value" id="val-mapi_slice"><a href="#val-mapi_slice" class="anchor"></a><code><span class="keyword">val</span> mapi_slice : <span>?&#8288;axis:int</span> <span>&#45;&gt;</span> <span>(int <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span class="type-var">'c</span>)</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span class="type-var">'c</span> array</span></code></dt><dd><p>``mapi_slice ~axis f x`` maps the slices along the specified ``axis`` in ``x`` and applies the function ``f``. By default, ``axis`` is 0. The index of of the slice is passed in.</p><p>Please refer to ``iteri_slice`` for more details.</p></dd></dl><dl><dt class="spec value" id="val-map_slice"><a href="#val-map_slice" class="anchor"></a><code><span class="keyword">val</span> map_slice : <span>?&#8288;axis:int</span> <span>&#45;&gt;</span> <span>(<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span class="type-var">'c</span>)</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span class="type-var">'c</span> array</span></code></dt><dd><p>Similar to ``mapi_slice`` but slice index is not passed in.</p></dd></dl><dl><dt class="spec value" id="val-filteri_slice"><a href="#val-filteri_slice" class="anchor"></a><code><span class="keyword">val</span> filteri_slice : <span>?&#8288;axis:int</span> <span>&#45;&gt;</span> <span>(int <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> bool)</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> array</span></code></dt><dd><p>``filteri_slice ~axis f x`` filters the slices along the specified ``axis`` in ``x``. The slices which satisfy the predicate ``f`` are returned in an array.</p><p>Please refer to ``iteri_slice`` for more details.</p></dd></dl><dl><dt class="spec value" id="val-filter_slice"><a href="#val-filter_slice" class="anchor"></a><code><span class="keyword">val</span> filter_slice : <span>?&#8288;axis:int</span> <span>&#45;&gt;</span> <span>(<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> bool)</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> array</span></code></dt><dd><p>Similar to ``filteri_slice`` but slice index is not passed in.</p></dd></dl><dl><dt class="spec value" id="val-foldi_slice"><a href="#val-foldi_slice" class="anchor"></a><code><span class="keyword">val</span> foldi_slice : <span>?&#8288;axis:int</span> <span>&#45;&gt;</span> <span>(int <span>&#45;&gt;</span> <span class="type-var">'c</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span class="type-var">'c</span>)</span> <span>&#45;&gt;</span> <span class="type-var">'c</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span class="type-var">'c</span></code></dt><dd><p>``foldi_slice ~axis f a x`` fold (left) the slices along the specified ``axis`` in ``x``. The slices which satisfy the predicate ``f`` are returned in an array.</p><p>Please refer to ``iteri_slice`` for more details.</p></dd></dl><dl><dt class="spec value" id="val-fold_slice"><a href="#val-fold_slice" class="anchor"></a><code><span class="keyword">val</span> fold_slice : <span>?&#8288;axis:int</span> <span>&#45;&gt;</span> <span>(<span class="type-var">'c</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span class="type-var">'c</span>)</span> <span>&#45;&gt;</span> <span class="type-var">'c</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span class="type-var">'c</span></code></dt><dd><p>Similar to ``foldi_slice`` but slice index is not passed in.</p></dd></dl></section><section><header><h6 id="examination-&amp;-comparison"><a href="#examination-&amp;-comparison" class="anchor"></a>Examination &amp; Comparison</h6></header><dl><dt class="spec value" id="val-exists"><a href="#val-exists" class="anchor"></a><code><span class="keyword">val</span> exists : <span>(<span class="type-var">'a</span> <span>&#45;&gt;</span> bool)</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> bool</code></dt><dd><p>``exists f x`` checks all the elements in ``x`` using ``f``. If at least one element satisfies ``f`` then the function returns ``true`` otherwise ``false``.</p></dd></dl><dl><dt class="spec value" id="val-not_exists"><a href="#val-not_exists" class="anchor"></a><code><span class="keyword">val</span> not_exists : <span>(<span class="type-var">'a</span> <span>&#45;&gt;</span> bool)</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> bool</code></dt><dd><p>``not_exists f x`` checks all the elements in ``x``, the function returns ``true`` only if all the elements fail to satisfy ``f : float -&gt; bool``.</p></dd></dl><dl><dt class="spec value" id="val-for_all"><a href="#val-for_all" class="anchor"></a><code><span class="keyword">val</span> for_all : <span>(<span class="type-var">'a</span> <span>&#45;&gt;</span> bool)</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> bool</code></dt><dd><p>``for_all f x`` checks all the elements in ``x``, the function returns ``true`` if and only if all the elements pass the check of function ``f``.</p></dd></dl><dl><dt class="spec value" id="val-is_zero"><a href="#val-is_zero" class="anchor"></a><code><span class="keyword">val</span> is_zero : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> bool</code></dt><dd><p>``is_zero x`` returns ``true`` if all the elements in ``x`` are zeros.</p></dd></dl><dl><dt class="spec value" id="val-is_positive"><a href="#val-is_positive" class="anchor"></a><code><span class="keyword">val</span> is_positive : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> bool</code></dt><dd><p>``is_positive x`` returns ``true`` if all the elements in ``x`` are positive.</p></dd></dl><dl><dt class="spec value" id="val-is_negative"><a href="#val-is_negative" class="anchor"></a><code><span class="keyword">val</span> is_negative : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> bool</code></dt><dd><p>``is_negative x`` returns ``true`` if all the elements in ``x`` are negative.</p></dd></dl><dl><dt class="spec value" id="val-is_nonpositive"><a href="#val-is_nonpositive" class="anchor"></a><code><span class="keyword">val</span> is_nonpositive : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> bool</code></dt><dd><p>``is_nonpositive`` returns ``true`` if all the elements in ``x`` are non-positive.</p></dd></dl><dl><dt class="spec value" id="val-is_nonnegative"><a href="#val-is_nonnegative" class="anchor"></a><code><span class="keyword">val</span> is_nonnegative : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> bool</code></dt><dd><p>``is_nonnegative`` returns ``true`` if all the elements in ``x`` are non-negative.</p></dd></dl><dl><dt class="spec value" id="val-is_normal"><a href="#val-is_normal" class="anchor"></a><code><span class="keyword">val</span> is_normal : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> bool</code></dt><dd><p>``is_normal x`` returns ``true`` if all the elelments in ``x`` are normal float numbers, i.e., not ``NaN``, not ``INF``, not ``SUBNORMAL``. Please refer to</p><p>https://www.gnu.org/software/libc/manual/html_node/Floating-Point-Classes.html https://www.gnu.org/software/libc/manual/html_node/Infinity-and-NaN.html#Infinity-and-NaN</p></dd></dl><dl><dt class="spec value" id="val-not_nan"><a href="#val-not_nan" class="anchor"></a><code><span class="keyword">val</span> not_nan : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> bool</code></dt><dd><p>``not_nan x`` returns ``false`` if there is any ``NaN`` element in ``x``. Otherwise, the function returns ``true`` indicating all the numbers in ``x`` are not ``NaN``.</p></dd></dl><dl><dt class="spec value" id="val-not_inf"><a href="#val-not_inf" class="anchor"></a><code><span class="keyword">val</span> not_inf : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> bool</code></dt><dd><p>``not_inf x`` returns ``false`` if there is any positive or negative ``INF`` element in ``x``. Otherwise, the function returns ``true``.</p></dd></dl><dl><dt class="spec value" id="val-equal"><a href="#val-equal" class="anchor"></a><code><span class="keyword">val</span> equal : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> bool</code></dt><dd><p>``equal x y`` returns ``true`` if two matrices ``x`` and ``y`` are equal.</p></dd></dl><dl><dt class="spec value" id="val-not_equal"><a href="#val-not_equal" class="anchor"></a><code><span class="keyword">val</span> not_equal : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> bool</code></dt><dd><p>``not_equal x y`` returns ``true`` if there is at least one element in ``x`` is not equal to that in ``y``.</p></dd></dl><dl><dt class="spec value" id="val-greater"><a href="#val-greater" class="anchor"></a><code><span class="keyword">val</span> greater : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> bool</code></dt><dd><p>``greater x y`` returns ``true`` if all the elements in ``x`` are greater than the corresponding elements in ``y``.</p></dd></dl><dl><dt class="spec value" id="val-less"><a href="#val-less" class="anchor"></a><code><span class="keyword">val</span> less : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> bool</code></dt><dd><p>``less x y`` returns ``true`` if all the elements in ``x`` are smaller than the corresponding elements in ``y``.</p></dd></dl><dl><dt class="spec value" id="val-greater_equal"><a href="#val-greater_equal" class="anchor"></a><code><span class="keyword">val</span> greater_equal : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> bool</code></dt><dd><p>``greater_equal x y`` returns ``true`` if all the elements in ``x`` are not smaller than the corresponding elements in ``y``.</p></dd></dl><dl><dt class="spec value" id="val-less_equal"><a href="#val-less_equal" class="anchor"></a><code><span class="keyword">val</span> less_equal : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> bool</code></dt><dd><p>``less_equal x y`` returns ``true`` if all the elements in ``x`` are not greater than the corresponding elements in ``y``.</p></dd></dl><dl><dt class="spec value" id="val-elt_equal"><a href="#val-elt_equal" class="anchor"></a><code><span class="keyword">val</span> elt_equal : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``elt_equal x y`` performs element-wise ``=`` comparison of ``x`` and ``y``. Assume that ``a`` is from ``x`` and ``b`` is the corresponding element of ``a`` from ``y`` of the same position. The function returns another binary (``0`` and ``1``) ndarray/matrix wherein ``1`` indicates ``a = b``.</p><p>The function supports broadcast operation.</p></dd></dl><dl><dt class="spec value" id="val-elt_not_equal"><a href="#val-elt_not_equal" class="anchor"></a><code><span class="keyword">val</span> elt_not_equal : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``elt_not_equal x y`` performs element-wise ``!=`` comparison of ``x`` and ``y``. Assume that ``a`` is from ``x`` and ``b`` is the corresponding element of ``a`` from ``y`` of the same position. The function returns another binary (``0`` and ``1``) ndarray/matrix wherein ``1`` indicates ``a &lt;&gt; b``.</p><p>The function supports broadcast operation.</p></dd></dl><dl><dt class="spec value" id="val-elt_less"><a href="#val-elt_less" class="anchor"></a><code><span class="keyword">val</span> elt_less : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``elt_less x y`` performs element-wise ``&lt;`` comparison of ``x`` and ``y``. Assume that ``a`` is from ``x`` and ``b`` is the corresponding element of ``a`` from ``y`` of the same position. The function returns another binary (``0`` and ``1``) ndarray/matrix wherein ``1`` indicates ``a &lt; b``.</p><p>The function supports broadcast operation.</p></dd></dl><dl><dt class="spec value" id="val-elt_greater"><a href="#val-elt_greater" class="anchor"></a><code><span class="keyword">val</span> elt_greater : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``elt_greater x y`` performs element-wise ``&gt;`` comparison of ``x`` and ``y``. Assume that ``a`` is from ``x`` and ``b`` is the corresponding element of ``a`` from ``y`` of the same position. The function returns another binary (``0`` and ``1``) ndarray/matrix wherein ``1`` indicates ``a &gt; b``.</p><p>The function supports broadcast operation.</p></dd></dl><dl><dt class="spec value" id="val-elt_less_equal"><a href="#val-elt_less_equal" class="anchor"></a><code><span class="keyword">val</span> elt_less_equal : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``elt_less_equal x y`` performs element-wise ``&lt;=`` comparison of ``x`` and ``y``. Assume that ``a`` is from ``x`` and ``b`` is the corresponding element of ``a`` from ``y`` of the same position. The function returns another binary (``0`` and ``1``) ndarray/matrix wherein ``1`` indicates ``a &lt;= b``.</p><p>The function supports broadcast operation.</p></dd></dl><dl><dt class="spec value" id="val-elt_greater_equal"><a href="#val-elt_greater_equal" class="anchor"></a><code><span class="keyword">val</span> elt_greater_equal : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``elt_greater_equal x y`` performs element-wise ``&gt;=`` comparison of ``x`` and ``y``. Assume that ``a`` is from ``x`` and ``b`` is the corresponding element of ``a`` from ``y`` of the same position. The function returns another binary (``0`` and ``1``) ndarray/matrix wherein ``1`` indicates ``a &gt;= b``.</p><p>The function supports broadcast operation.</p></dd></dl><dl><dt class="spec value" id="val-equal_scalar"><a href="#val-equal_scalar" class="anchor"></a><code><span class="keyword">val</span> equal_scalar : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> bool</code></dt><dd><p>``equal_scalar x a`` checks if all the elements in ``x`` are equal to ``a``. The function returns ``true`` iff for every element ``b`` in ``x``, ``b = a``.</p></dd></dl><dl><dt class="spec value" id="val-not_equal_scalar"><a href="#val-not_equal_scalar" class="anchor"></a><code><span class="keyword">val</span> not_equal_scalar : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> bool</code></dt><dd><p>``not_equal_scalar x a`` checks if all the elements in ``x`` are not equal to ``a``. The function returns ``true`` iff for every element ``b`` in ``x``, ``b &lt;&gt; a``.</p></dd></dl><dl><dt class="spec value" id="val-less_scalar"><a href="#val-less_scalar" class="anchor"></a><code><span class="keyword">val</span> less_scalar : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> bool</code></dt><dd><p>``less_scalar x a`` checks if all the elements in ``x`` are less than ``a``. The function returns ``true`` iff for every element ``b`` in ``x``, ``b &lt; a``.</p></dd></dl><dl><dt class="spec value" id="val-greater_scalar"><a href="#val-greater_scalar" class="anchor"></a><code><span class="keyword">val</span> greater_scalar : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> bool</code></dt><dd><p>``greater_scalar x a`` checks if all the elements in ``x`` are greater than ``a``. The function returns ``true`` iff for every element ``b`` in ``x``, ``b &gt; a``.</p></dd></dl><dl><dt class="spec value" id="val-less_equal_scalar"><a href="#val-less_equal_scalar" class="anchor"></a><code><span class="keyword">val</span> less_equal_scalar : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> bool</code></dt><dd><p>``less_equal_scalar x a`` checks if all the elements in ``x`` are less or equal to ``a``. The function returns ``true`` iff for every element ``b`` in ``x``, ``b &lt;= a``.</p></dd></dl><dl><dt class="spec value" id="val-greater_equal_scalar"><a href="#val-greater_equal_scalar" class="anchor"></a><code><span class="keyword">val</span> greater_equal_scalar : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> bool</code></dt><dd><p>``greater_equal_scalar x a`` checks if all the elements in ``x`` are greater or equal to ``a``. The function returns ``true`` iff for every element ``b`` in ``x``, ``b &gt;= a``.</p></dd></dl><dl><dt class="spec value" id="val-elt_equal_scalar"><a href="#val-elt_equal_scalar" class="anchor"></a><code><span class="keyword">val</span> elt_equal_scalar : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``elt_equal_scalar x a`` performs element-wise ``=`` comparison of ``x`` and ``a``. Assume that ``b`` is one element from ``x`` The function returns another binary (``0`` and ``1``) ndarray/matrix wherein ``1`` of the corresponding position indicates ``a = b``, otherwise ``0``.</p></dd></dl><dl><dt class="spec value" id="val-elt_not_equal_scalar"><a href="#val-elt_not_equal_scalar" class="anchor"></a><code><span class="keyword">val</span> elt_not_equal_scalar : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``elt_not_equal_scalar x a`` performs element-wise ``!=`` comparison of ``x`` and ``a``. Assume that ``b`` is one element from ``x`` The function returns another binary (``0`` and ``1``) ndarray/matrix wherein ``1`` of the corresponding position indicates ``a &lt;&gt; b``, otherwise ``0``.</p></dd></dl><dl><dt class="spec value" id="val-elt_less_scalar"><a href="#val-elt_less_scalar" class="anchor"></a><code><span class="keyword">val</span> elt_less_scalar : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``elt_less_scalar x a`` performs element-wise ``&lt;`` comparison of ``x`` and ``a``. Assume that ``b`` is one element from ``x`` The function returns another binary (``0`` and ``1``) ndarray/matrix wherein ``1`` of the corresponding position indicates ``a &lt; b``, otherwise ``0``.</p></dd></dl><dl><dt class="spec value" id="val-elt_greater_scalar"><a href="#val-elt_greater_scalar" class="anchor"></a><code><span class="keyword">val</span> elt_greater_scalar : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``elt_greater_scalar x a`` performs element-wise ``&gt;`` comparison of ``x`` and ``a``. Assume that ``b`` is one element from ``x`` The function returns another binary (``0`` and ``1``) ndarray/matrix wherein ``1`` of the corresponding position indicates ``a &gt; b``, otherwise ``0``.</p></dd></dl><dl><dt class="spec value" id="val-elt_less_equal_scalar"><a href="#val-elt_less_equal_scalar" class="anchor"></a><code><span class="keyword">val</span> elt_less_equal_scalar : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``elt_less_equal_scalar x a`` performs element-wise ``&lt;=`` comparison of ``x`` and ``a``. Assume that ``b`` is one element from ``x`` The function returns another binary (``0`` and ``1``) ndarray/matrix wherein ``1`` of the corresponding position indicates ``a &lt;= b``, otherwise ``0``.</p></dd></dl><dl><dt class="spec value" id="val-elt_greater_equal_scalar"><a href="#val-elt_greater_equal_scalar" class="anchor"></a><code><span class="keyword">val</span> elt_greater_equal_scalar : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``elt_greater_equal_scalar x a`` performs element-wise ``&gt;=`` comparison of ``x`` and ``a``. Assume that ``b`` is one element from ``x`` The function returns another binary (``0`` and ``1``) ndarray/matrix wherein ``1`` of the corresponding position indicates ``a &gt;= b``, otherwise ``0``.</p></dd></dl><dl><dt class="spec value" id="val-approx_equal"><a href="#val-approx_equal" class="anchor"></a><code><span class="keyword">val</span> approx_equal : <span>?&#8288;eps:float</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> bool</code></dt><dd><p>``approx_equal ~eps x y`` returns ``true`` if ``x`` and ``y`` are approximately equal, i.e., for any two elements ``a`` from ``x`` and ``b`` from ``y``, we have ``abs (a - b) &lt; eps``. For complex numbers, the ``eps`` applies to both real and imaginary part.</p><p>Note: the threshold check is exclusive for passed in ``eps``, i.e., the threshold interval is ``(a-eps, a+eps)``.</p></dd></dl><dl><dt class="spec value" id="val-approx_equal_scalar"><a href="#val-approx_equal_scalar" class="anchor"></a><code><span class="keyword">val</span> approx_equal_scalar : <span>?&#8288;eps:float</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> bool</code></dt><dd><p>``approx_equal_scalar ~eps x a`` returns ``true`` all the elements in ``x`` are approximately equal to ``a``, i.e., ``abs (x - a) &lt; eps``. For complex numbers, the ``eps`` applies to both real and imaginary part.</p><p>Note: the threshold check is exclusive for the passed in ``eps``.</p></dd></dl><dl><dt class="spec value" id="val-approx_elt_equal"><a href="#val-approx_elt_equal" class="anchor"></a><code><span class="keyword">val</span> approx_elt_equal : <span>?&#8288;eps:float</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``approx_elt_equal ~eps x y`` compares the element-wise equality of ``x`` and ``y``, then returns another binary (i.e., ``0`` and ``1``) ndarray/matrix wherein ``1`` indicates that two corresponding elements ``a`` from ``x`` and ``b`` from ``y`` are considered as approximately equal, namely ``abs (a - b) &lt; eps``.</p></dd></dl><dl><dt class="spec value" id="val-approx_elt_equal_scalar"><a href="#val-approx_elt_equal_scalar" class="anchor"></a><code><span class="keyword">val</span> approx_elt_equal_scalar : <span>?&#8288;eps:float</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``approx_elt_equal_scalar ~eps x a`` compares all the elements of ``x`` to a scalar value ``a``, then returns another binary (i.e., ``0`` and ``1``) ndarray/matrix wherein ``1`` indicates that the element ``b`` from ``x`` is considered as approximately equal to ``a``, namely ``abs (a - b) &lt; eps``.</p></dd></dl></section><section><header><h6 id="input/output-functions"><a href="#input/output-functions" class="anchor"></a>Input/Output functions</h6></header><dl><dt class="spec value" id="val-of_array"><a href="#val-of_array" class="anchor"></a><code><span class="keyword">val</span> of_array : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-kind">kind</a></span> <span>&#45;&gt;</span> <span><span class="type-var">'a</span> array</span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``of_array k x d`` takes an array ``x`` and converts it into an ndarray of type ``k`` and shape ``d``.</p></dd></dl><dl><dt class="spec value" id="val-to_array"><a href="#val-to_array" class="anchor"></a><code><span class="keyword">val</span> to_array : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span class="type-var">'a</span> array</span></code></dt><dd><p>``to_array x`` converts an ndarray ``x`` to OCaml's array type. Note that the ndarray ``x`` is flattened before convertion.</p></dd></dl><dl><dt class="spec value" id="val-print"><a href="#val-print" class="anchor"></a><code><span class="keyword">val</span> print : <span>?&#8288;max_row:int</span> <span>&#45;&gt;</span> <span>?&#8288;max_col:int</span> <span>&#45;&gt;</span> <span>?&#8288;header:bool</span> <span>&#45;&gt;</span> <span>?&#8288;fmt:<span>(<span class="type-var">'a</span> <span>&#45;&gt;</span> string)</span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``print x`` prints all the elements in ``x`` as well as their indices. ``max_row`` and ``max_col`` specify the maximum number of rows and columns to display. ``header`` specifies whether or not to print out the headers. ``fmt`` is the function to format every element into string.</p></dd></dl><dl><dt class="spec value" id="val-pp_dsnda"><a href="#val-pp_dsnda" class="anchor"></a><code><span class="keyword">val</span> pp_dsnda : Stdlib.Format.formatter <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``pp_dsnda x`` prints ``x`` in OCaml toplevel. If the ndarray is too long, ``pp_dsnda`` only prints out parts of the ndarray.</p></dd></dl><dl><dt class="spec value" id="val-save"><a href="#val-save" class="anchor"></a><code><span class="keyword">val</span> save : <span>out:string</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``save ~out x`` serialises a ndarray ``x`` to a file of name ``out``.</p></dd></dl><dl><dt class="spec value" id="val-load"><a href="#val-load" class="anchor"></a><code><span class="keyword">val</span> load : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-kind">kind</a></span> <span>&#45;&gt;</span> string <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``load k s`` loads previously serialised ndarray from file ``s`` into memory. It is necesssary to specify the type of the ndarray with paramater ``k``.</p></dd></dl><dl><dt class="spec value" id="val-save_npy"><a href="#val-save_npy" class="anchor"></a><code><span class="keyword">val</span> save_npy : <span>out:string</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``save_npy ~out x`` saves the matrix ``x`` into a npy file ``out``. This function is implemented using npy-ocaml https://github.com/LaurentMazare/npy-ocaml.</p></dd></dl><dl><dt class="spec value" id="val-load_npy"><a href="#val-load_npy" class="anchor"></a><code><span class="keyword">val</span> load_npy : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-kind">kind</a></span> <span>&#45;&gt;</span> string <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``load_npy file`` load a npy ``file`` into a matrix of type ``k``. If the matrix is in the file is not of type ``k``, fails with ``<code>file</code>: incorrect format``. This function is implemented using npy-ocaml https://github.com/LaurentMazare/npy-ocaml.</p></dd></dl></section><section><header><h6 id="unary-math-operators"><a href="#unary-math-operators" class="anchor"></a>Unary math operators</h6></header><dl><dt class="spec value" id="val-re_c2s"><a href="#val-re_c2s" class="anchor"></a><code><span class="keyword">val</span> re_c2s : <span><span>(Stdlib.Complex.t, Stdlib.Bigarray.complex32_elt)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(float, Stdlib.Bigarray.float32_elt)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``re_c2s x`` returns all the real components of ``x`` in a new ndarray of same shape.</p></dd></dl><dl><dt class="spec value" id="val-re_z2d"><a href="#val-re_z2d" class="anchor"></a><code><span class="keyword">val</span> re_z2d : <span><span>(Stdlib.Complex.t, Stdlib.Bigarray.complex64_elt)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(float, Stdlib.Bigarray.float64_elt)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``re_d2z x`` returns all the real components of ``x`` in a new ndarray of same shape.</p></dd></dl><dl><dt class="spec value" id="val-im_c2s"><a href="#val-im_c2s" class="anchor"></a><code><span class="keyword">val</span> im_c2s : <span><span>(Stdlib.Complex.t, Stdlib.Bigarray.complex32_elt)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(float, Stdlib.Bigarray.float32_elt)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``im_c2s x`` returns all the imaginary components of ``x`` in a new ndarray of same shape.</p></dd></dl><dl><dt class="spec value" id="val-im_z2d"><a href="#val-im_z2d" class="anchor"></a><code><span class="keyword">val</span> im_z2d : <span><span>(Stdlib.Complex.t, Stdlib.Bigarray.complex64_elt)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(float, Stdlib.Bigarray.float64_elt)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``im_d2z x`` returns all the imaginary components of ``x`` in a new ndarray of same shape.</p></dd></dl><dl><dt class="spec value" id="val-sum"><a href="#val-sum" class="anchor"></a><code><span class="keyword">val</span> sum : <span>?&#8288;axis:int</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``sum ~axis x`` sums the elements in ``x`` along specified ``axis``.</p></dd></dl><dl><dt class="spec value" id="val-sum'"><a href="#val-sum'" class="anchor"></a><code><span class="keyword">val</span> sum' : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span></code></dt><dd><p>``sum' x`` returns the sumtion of all elements in ``x``.</p></dd></dl><dl><dt class="spec value" id="val-sum_reduce"><a href="#val-sum_reduce" class="anchor"></a><code><span class="keyword">val</span> sum_reduce : <span>?&#8288;axis:<span>int array</span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``sum_reduce ~axis x`` sums the elements in ``x`` along multiple axes specified in the ``axis`` array.</p></dd></dl><dl><dt class="spec value" id="val-prod"><a href="#val-prod" class="anchor"></a><code><span class="keyword">val</span> prod : <span>?&#8288;axis:int</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``prod ~axis x`` multiples the elements in ``x`` along specified ``axis``.</p></dd></dl><dl><dt class="spec value" id="val-prod'"><a href="#val-prod'" class="anchor"></a><code><span class="keyword">val</span> prod' : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span></code></dt><dd><p>``prod x`` returns the product of all elements in ``x`` along passed in axises.</p></dd></dl><dl><dt class="spec value" id="val-mean"><a href="#val-mean" class="anchor"></a><code><span class="keyword">val</span> mean : <span>?&#8288;axis:int</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``mean ~axis x`` calculates the mean along specified ``axis``.</p></dd></dl><dl><dt class="spec value" id="val-mean'"><a href="#val-mean'" class="anchor"></a><code><span class="keyword">val</span> mean' : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span></code></dt><dd><p>``mean' x`` calculates the mean of all the elements in ``x``.</p></dd></dl><dl><dt class="spec value" id="val-median"><a href="#val-median" class="anchor"></a><code><span class="keyword">val</span> median : <span>?&#8288;axis:int</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``median ~axis x`` calculates the median along specified ``axis`` of ``x``.</p></dd></dl><dl><dt class="spec value" id="val-median'"><a href="#val-median'" class="anchor"></a><code><span class="keyword">val</span> median' : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span></code></dt><dd><p>``median x`` calculates the median of a flattened version of ``x``.</p></dd></dl><dl><dt class="spec value" id="val-var"><a href="#val-var" class="anchor"></a><code><span class="keyword">val</span> var : <span>?&#8288;axis:int</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``var ~axis x`` calculates the variance along specified ``axis``.</p></dd></dl><dl><dt class="spec value" id="val-var'"><a href="#val-var'" class="anchor"></a><code><span class="keyword">val</span> var' : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span></code></dt><dd><p>``var' x`` calculates the variance of all the elements in ``x``.</p></dd></dl><dl><dt class="spec value" id="val-std"><a href="#val-std" class="anchor"></a><code><span class="keyword">val</span> std : <span>?&#8288;axis:int</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``std ~axis`` calculates the standard deviation along specified ``axis``.</p></dd></dl><dl><dt class="spec value" id="val-std'"><a href="#val-std'" class="anchor"></a><code><span class="keyword">val</span> std' : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span></code></dt><dd><p>``std' x`` calculates the standard deviation of all the elements in ``x``.</p></dd></dl><dl><dt class="spec value" id="val-min"><a href="#val-min" class="anchor"></a><code><span class="keyword">val</span> min : <span>?&#8288;axis:int</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``min x`` returns the minimum of all elements in ``x`` along specified ``axis``. If no axis is specified, ``x`` will be flattened and the minimum of all the elements will be returned. For two complex numbers, the one with the smaller magnitude will be selected. If two magnitudes are the same, the one with the smaller phase will be selected.</p></dd></dl><dl><dt class="spec value" id="val-min'"><a href="#val-min'" class="anchor"></a><code><span class="keyword">val</span> min' : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span></code></dt><dd><p>``min' x`` is similar to ``min`` but returns the minimum of all elements in ``x`` in scalar value.</p></dd></dl><dl><dt class="spec value" id="val-max"><a href="#val-max" class="anchor"></a><code><span class="keyword">val</span> max : <span>?&#8288;axis:int</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``max x`` returns the maximum of all elements in ``x`` along specified ``axis``. If no axis is specified, ``x`` will be flattened and the maximum of all the elements will be returned. For two complex numbers, the one with the greater magnitude will be selected. If two magnitudes are the same, the one with the greater phase will be selected.</p></dd></dl><dl><dt class="spec value" id="val-max'"><a href="#val-max'" class="anchor"></a><code><span class="keyword">val</span> max' : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span></code></dt><dd><p>``max' x`` is similar to ``max`` but returns the maximum of all elements in ``x`` in scalar value.</p></dd></dl><dl><dt class="spec value" id="val-minmax"><a href="#val-minmax" class="anchor"></a><code><span class="keyword">val</span> minmax : <span>?&#8288;axis:int</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> * <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``minmax' x`` returns ``(min_v, max_v)``, ``min_v`` is the minimum value in ``x`` while ``max_v`` is the maximum.</p></dd></dl><dl><dt class="spec value" id="val-minmax'"><a href="#val-minmax'" class="anchor"></a><code><span class="keyword">val</span> minmax' : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> * <span class="type-var">'a</span></code></dt><dd><p>``minmax' x`` returns ``(min_v, max_v)``, ``min_v`` is the minimum value in ``x`` while ``max_v`` is the maximum.</p></dd></dl><dl><dt class="spec value" id="val-min_i"><a href="#val-min_i" class="anchor"></a><code><span class="keyword">val</span> min_i : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> * <span>int array</span></code></dt><dd><p>``min_i x`` returns the minimum of all elements in ``x`` as well as its index.</p></dd></dl><dl><dt class="spec value" id="val-max_i"><a href="#val-max_i" class="anchor"></a><code><span class="keyword">val</span> max_i : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> * <span>int array</span></code></dt><dd><p>``max_i x`` returns the maximum of all elements in ``x`` as well as its index.</p></dd></dl><dl><dt class="spec value" id="val-minmax_i"><a href="#val-minmax_i" class="anchor"></a><code><span class="keyword">val</span> minmax_i : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span>(<span class="type-var">'a</span> * <span>int array</span>)</span> * <span>(<span class="type-var">'a</span> * <span>int array</span>)</span></code></dt><dd><p>``minmax_i x`` returns ``((min_v,min_i), (max_v,max_i))`` where ``(min_v,min_i)`` is the minimum value in ``x`` along with its index while ``(max_v,max_i)`` is the maximum value along its index.</p></dd></dl><dl><dt class="spec value" id="val-abs"><a href="#val-abs" class="anchor"></a><code><span class="keyword">val</span> abs : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``abs x`` returns the absolute value of all elements in ``x`` in a new ndarray.</p></dd></dl><dl><dt class="spec value" id="val-abs_c2s"><a href="#val-abs_c2s" class="anchor"></a><code><span class="keyword">val</span> abs_c2s : <span><span>(Stdlib.Complex.t, Stdlib.Bigarray.complex32_elt)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(float, Stdlib.Bigarray.float32_elt)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``abs_c2s x`` is similar to ``abs`` but takes ``complex32`` as input.</p></dd></dl><dl><dt class="spec value" id="val-abs_z2d"><a href="#val-abs_z2d" class="anchor"></a><code><span class="keyword">val</span> abs_z2d : <span><span>(Stdlib.Complex.t, Stdlib.Bigarray.complex64_elt)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(float, Stdlib.Bigarray.float64_elt)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``abs_z2d x`` is similar to ``abs`` but takes ``complex64`` as input.</p></dd></dl><dl><dt class="spec value" id="val-abs2"><a href="#val-abs2" class="anchor"></a><code><span class="keyword">val</span> abs2 : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``abs2 x`` returns the square of absolute value of all elements in ``x`` in a new ndarray.</p></dd></dl><dl><dt class="spec value" id="val-abs2_c2s"><a href="#val-abs2_c2s" class="anchor"></a><code><span class="keyword">val</span> abs2_c2s : <span><span>(Stdlib.Complex.t, Stdlib.Bigarray.complex32_elt)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(float, Stdlib.Bigarray.float32_elt)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``abs2_c2s x`` is similar to ``abs2`` but takes ``complex32`` as input.</p></dd></dl><dl><dt class="spec value" id="val-abs2_z2d"><a href="#val-abs2_z2d" class="anchor"></a><code><span class="keyword">val</span> abs2_z2d : <span><span>(Stdlib.Complex.t, Stdlib.Bigarray.complex64_elt)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(float, Stdlib.Bigarray.float64_elt)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``abs2_z2d x`` is similar to ``abs2`` but takes ``complex64`` as input.</p></dd></dl><dl><dt class="spec value" id="val-conj"><a href="#val-conj" class="anchor"></a><code><span class="keyword">val</span> conj : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``conj x`` returns the conjugate of the complex ``x``.</p></dd></dl><dl><dt class="spec value" id="val-neg"><a href="#val-neg" class="anchor"></a><code><span class="keyword">val</span> neg : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``neg x`` negates the elements in ``x`` and returns the result in a new ndarray.</p></dd></dl><dl><dt class="spec value" id="val-reci"><a href="#val-reci" class="anchor"></a><code><span class="keyword">val</span> reci : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``reci x`` computes the reciprocal of every elements in ``x`` and returns the result in a new ndarray.</p></dd></dl><dl><dt class="spec value" id="val-reci_tol"><a href="#val-reci_tol" class="anchor"></a><code><span class="keyword">val</span> reci_tol : <span>?&#8288;tol:<span class="type-var">'a</span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``reci_tol ~tol x`` computes the reciprocal of every element in ``x``. Different from ``reci``, ``reci_tol`` sets the elements whose ``abs`` value smaller than ``tol`` to zeros. If ``tol`` is not specified, the defautl ``Owl_utils.eps Float32`` will be used. For complex numbers, refer to Owl's doc to see how to compare.</p></dd></dl><dl><dt class="spec value" id="val-signum"><a href="#val-signum" class="anchor"></a><code><span class="keyword">val</span> signum : <span><span>(float, <span class="type-var">'a</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(float, <span class="type-var">'a</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``signum`` computes the sign value (``-1`` for negative numbers, ``0`` (or ``-0``) for zero, ``1`` for positive numbers, ``nan`` for ``nan``).</p></dd></dl><dl><dt class="spec value" id="val-sqr"><a href="#val-sqr" class="anchor"></a><code><span class="keyword">val</span> sqr : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``sqr x`` computes the square of the elements in ``x`` and returns the result in a new ndarray.</p></dd></dl><dl><dt class="spec value" id="val-sqrt"><a href="#val-sqrt" class="anchor"></a><code><span class="keyword">val</span> sqrt : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``sqrt x`` computes the square root of the elements in ``x`` and returns the result in a new ndarray.</p></dd></dl><dl><dt class="spec value" id="val-cbrt"><a href="#val-cbrt" class="anchor"></a><code><span class="keyword">val</span> cbrt : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``cbrt x`` computes the cubic root of the elements in ``x`` and returns the result in a new ndarray.</p></dd></dl><dl><dt class="spec value" id="val-exp"><a href="#val-exp" class="anchor"></a><code><span class="keyword">val</span> exp : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``exp x`` computes the exponential of the elements in ``x`` and returns the result in a new ndarray.</p></dd></dl><dl><dt class="spec value" id="val-exp2"><a href="#val-exp2" class="anchor"></a><code><span class="keyword">val</span> exp2 : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``exp2 x`` computes the base-2 exponential of the elements in ``x`` and returns the result in a new ndarray.</p></dd></dl><dl><dt class="spec value" id="val-exp10"><a href="#val-exp10" class="anchor"></a><code><span class="keyword">val</span> exp10 : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``exp10 x`` computes the base-10 exponential of the elements in ``x`` and returns the result in a new ndarray.</p></dd></dl><dl><dt class="spec value" id="val-expm1"><a href="#val-expm1" class="anchor"></a><code><span class="keyword">val</span> expm1 : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``expm1 x`` computes ``exp x -. 1.`` of the elements in ``x`` and returns the result in a new ndarray.</p></dd></dl><dl><dt class="spec value" id="val-log"><a href="#val-log" class="anchor"></a><code><span class="keyword">val</span> log : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``log x`` computes the logarithm of the elements in ``x`` and returns the result in a new ndarray.</p></dd></dl><dl><dt class="spec value" id="val-log10"><a href="#val-log10" class="anchor"></a><code><span class="keyword">val</span> log10 : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``log10 x`` computes the base-10 logarithm of the elements in ``x`` and returns the result in a new ndarray.</p></dd></dl><dl><dt class="spec value" id="val-log2"><a href="#val-log2" class="anchor"></a><code><span class="keyword">val</span> log2 : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``log2 x`` computes the base-2 logarithm of the elements in ``x`` and returns the result in a new ndarray.</p></dd></dl><dl><dt class="spec value" id="val-log1p"><a href="#val-log1p" class="anchor"></a><code><span class="keyword">val</span> log1p : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``log1p x`` computes ``log (1 + x)`` of the elements in ``x`` and returns the result in a new ndarray.</p></dd></dl><dl><dt class="spec value" id="val-sin"><a href="#val-sin" class="anchor"></a><code><span class="keyword">val</span> sin : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``sin x`` computes the sine of the elements in ``x`` and returns the result in a new ndarray.</p></dd></dl><dl><dt class="spec value" id="val-cos"><a href="#val-cos" class="anchor"></a><code><span class="keyword">val</span> cos : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``cos x`` computes the cosine of the elements in ``x`` and returns the result in a new ndarray.</p></dd></dl><dl><dt class="spec value" id="val-tan"><a href="#val-tan" class="anchor"></a><code><span class="keyword">val</span> tan : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``tan x`` computes the tangent of the elements in ``x`` and returns the result in a new ndarray.</p></dd></dl><dl><dt class="spec value" id="val-asin"><a href="#val-asin" class="anchor"></a><code><span class="keyword">val</span> asin : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``asin x`` computes the arc sine of the elements in ``x`` and returns the result in a new ndarray.</p></dd></dl><dl><dt class="spec value" id="val-acos"><a href="#val-acos" class="anchor"></a><code><span class="keyword">val</span> acos : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``acos x`` computes the arc cosine of the elements in ``x`` and returns the result in a new ndarray.</p></dd></dl><dl><dt class="spec value" id="val-atan"><a href="#val-atan" class="anchor"></a><code><span class="keyword">val</span> atan : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``atan x`` computes the arc tangent of the elements in ``x`` and returns the result in a new ndarray.</p></dd></dl><dl><dt class="spec value" id="val-sinh"><a href="#val-sinh" class="anchor"></a><code><span class="keyword">val</span> sinh : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``sinh x`` computes the hyperbolic sine of the elements in ``x`` and returns the result in a new ndarray.</p></dd></dl><dl><dt class="spec value" id="val-cosh"><a href="#val-cosh" class="anchor"></a><code><span class="keyword">val</span> cosh : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``cosh x`` computes the hyperbolic cosine of the elements in ``x`` and returns the result in a new ndarray.</p></dd></dl><dl><dt class="spec value" id="val-tanh"><a href="#val-tanh" class="anchor"></a><code><span class="keyword">val</span> tanh : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``tanh x`` computes the hyperbolic tangent of the elements in ``x`` and returns the result in a new ndarray.</p></dd></dl><dl><dt class="spec value" id="val-asinh"><a href="#val-asinh" class="anchor"></a><code><span class="keyword">val</span> asinh : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``asinh x`` computes the hyperbolic arc sine of the elements in ``x`` and returns the result in a new ndarray.</p></dd></dl><dl><dt class="spec value" id="val-acosh"><a href="#val-acosh" class="anchor"></a><code><span class="keyword">val</span> acosh : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``acosh x`` computes the hyperbolic arc cosine of the elements in ``x`` and returns the result in a new ndarray.</p></dd></dl><dl><dt class="spec value" id="val-atanh"><a href="#val-atanh" class="anchor"></a><code><span class="keyword">val</span> atanh : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``atanh x`` computes the hyperbolic arc tangent of the elements in ``x`` and returns the result in a new ndarray.</p></dd></dl><dl><dt class="spec value" id="val-floor"><a href="#val-floor" class="anchor"></a><code><span class="keyword">val</span> floor : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``floor x`` computes the floor of the elements in ``x`` and returns the result in a new ndarray.</p></dd></dl><dl><dt class="spec value" id="val-ceil"><a href="#val-ceil" class="anchor"></a><code><span class="keyword">val</span> ceil : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``ceil x`` computes the ceiling of the elements in ``x`` and returns the result in a new ndarray.</p></dd></dl><dl><dt class="spec value" id="val-round"><a href="#val-round" class="anchor"></a><code><span class="keyword">val</span> round : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``round x`` rounds the elements in ``x`` and returns the result in a new ndarray.</p></dd></dl><dl><dt class="spec value" id="val-trunc"><a href="#val-trunc" class="anchor"></a><code><span class="keyword">val</span> trunc : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``trunc x`` computes the truncation of the elements in ``x`` and returns the result in a new ndarray.</p></dd></dl><dl><dt class="spec value" id="val-fix"><a href="#val-fix" class="anchor"></a><code><span class="keyword">val</span> fix : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``fix x`` rounds each element of ``x`` to the nearest integer toward zero. For positive elements, the behavior is the same as ``floor``. For negative ones, the behavior is the same as ``ceil``.</p></dd></dl><dl><dt class="spec value" id="val-modf"><a href="#val-modf" class="anchor"></a><code><span class="keyword">val</span> modf : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> * <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``modf x`` performs ``modf`` over all the elements in ``x``, the fractal part is saved in the first element of the returned tuple whereas the integer part is saved in the second element.</p></dd></dl><dl><dt class="spec value" id="val-erf"><a href="#val-erf" class="anchor"></a><code><span class="keyword">val</span> erf : <span><span>(float, <span class="type-var">'a</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(float, <span class="type-var">'a</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``erf x`` computes the error function of the elements in ``x`` and returns the result in a new ndarray.</p></dd></dl><dl><dt class="spec value" id="val-erfc"><a href="#val-erfc" class="anchor"></a><code><span class="keyword">val</span> erfc : <span><span>(float, <span class="type-var">'a</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(float, <span class="type-var">'a</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``erfc x`` computes the complementary error function of the elements in ``x`` and returns the result in a new ndarray.</p></dd></dl><dl><dt class="spec value" id="val-logistic"><a href="#val-logistic" class="anchor"></a><code><span class="keyword">val</span> logistic : <span><span>(float, <span class="type-var">'a</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(float, <span class="type-var">'a</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``logistic x`` computes the logistic function ``1/(1 + exp(-a)`` of the elements in ``x`` and returns the result in a new ndarray.</p></dd></dl><dl><dt class="spec value" id="val-relu"><a href="#val-relu" class="anchor"></a><code><span class="keyword">val</span> relu : <span><span>(float, <span class="type-var">'a</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(float, <span class="type-var">'a</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``relu x`` computes the rectified linear unit function ``max(x, 0)`` of the elements in ``x`` and returns the result in a new ndarray.</p></dd></dl><dl><dt class="spec value" id="val-elu"><a href="#val-elu" class="anchor"></a><code><span class="keyword">val</span> elu : <span>?&#8288;alpha:float</span> <span>&#45;&gt;</span> <span><span>(float, <span class="type-var">'a</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(float, <span class="type-var">'a</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``elu alpha x`` computes the exponential linear unit function ``x &gt;= 0. ? x : (alpha * (exp(x) - 1))`` of the elements in ``x`` and returns the result in a new ndarray.</p></dd></dl><dl><dt class="spec value" id="val-leaky_relu"><a href="#val-leaky_relu" class="anchor"></a><code><span class="keyword">val</span> leaky_relu : <span>?&#8288;alpha:float</span> <span>&#45;&gt;</span> <span><span>(float, <span class="type-var">'a</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(float, <span class="type-var">'a</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``leaky_relu alpha x`` computes the leaky rectified linear unit function ``x &gt;= 0. ? x : (alpha * x)`` of the elements in ``x`` and returns the result in a new ndarray.</p></dd></dl><dl><dt class="spec value" id="val-softplus"><a href="#val-softplus" class="anchor"></a><code><span class="keyword">val</span> softplus : <span><span>(float, <span class="type-var">'a</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(float, <span class="type-var">'a</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``softplus x`` computes the softplus function ``log(1 + exp(x)`` of the elements in ``x`` and returns the result in a new ndarray.</p></dd></dl><dl><dt class="spec value" id="val-softsign"><a href="#val-softsign" class="anchor"></a><code><span class="keyword">val</span> softsign : <span><span>(float, <span class="type-var">'a</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(float, <span class="type-var">'a</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``softsign x`` computes the softsign function ``x / (1 + abs(x))`` of the elements in ``x`` and returns the result in a new ndarray.</p></dd></dl><dl><dt class="spec value" id="val-softmax"><a href="#val-softmax" class="anchor"></a><code><span class="keyword">val</span> softmax : <span>?&#8288;axis:int</span> <span>&#45;&gt;</span> <span><span>(float, <span class="type-var">'a</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(float, <span class="type-var">'a</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``softmax x`` computes the softmax functions ``(exp x) / (sum (exp x))`` of all the elements along the specified ``axis`` in ``x`` and returns the result in a new ndarray.</p><p>By default, ``axis = -1``, i.e. along the highest dimension.</p></dd></dl><dl><dt class="spec value" id="val-sigmoid"><a href="#val-sigmoid" class="anchor"></a><code><span class="keyword">val</span> sigmoid : <span><span>(float, <span class="type-var">'a</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(float, <span class="type-var">'a</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``sigmoid x`` computes the sigmoid function ``1 / (1 + exp (-x))`` for each element in ``x``.</p></dd></dl><dl><dt class="spec value" id="val-log_sum_exp'"><a href="#val-log_sum_exp'" class="anchor"></a><code><span class="keyword">val</span> log_sum_exp' : <span><span>(float, <span class="type-var">'a</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> float</code></dt><dd><p>``log_sum_exp x`` computes the logarithm of the sum of exponentials of all the elements in ``x``.</p></dd></dl><dl><dt class="spec value" id="val-l1norm"><a href="#val-l1norm" class="anchor"></a><code><span class="keyword">val</span> l1norm : <span>?&#8288;axis:int</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``l1norm x`` calculates the l1-norm of of ``x`` along specified axis.</p></dd></dl><dl><dt class="spec value" id="val-l1norm'"><a href="#val-l1norm'" class="anchor"></a><code><span class="keyword">val</span> l1norm' : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span></code></dt><dd><p>``l1norm x`` calculates the l1-norm of all the element in ``x``.</p></dd></dl><dl><dt class="spec value" id="val-l2norm"><a href="#val-l2norm" class="anchor"></a><code><span class="keyword">val</span> l2norm : <span>?&#8288;axis:int</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``l2norm x`` calculates the l2-norm of of ``x`` along specified axis.</p></dd></dl><dl><dt class="spec value" id="val-l2norm'"><a href="#val-l2norm'" class="anchor"></a><code><span class="keyword">val</span> l2norm' : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span></code></dt><dd><p>``l2norm x`` calculates the l2-norm of all the element in ``x``.</p></dd></dl><dl><dt class="spec value" id="val-l2norm_sqr"><a href="#val-l2norm_sqr" class="anchor"></a><code><span class="keyword">val</span> l2norm_sqr : <span>?&#8288;axis:int</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``l2norm_sqr x`` calculates the square l2-norm of of ``x`` along specified axis.</p></dd></dl><dl><dt class="spec value" id="val-l2norm_sqr'"><a href="#val-l2norm_sqr'" class="anchor"></a><code><span class="keyword">val</span> l2norm_sqr' : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span></code></dt><dd><p>``l2norm_sqr x`` calculates the square of l2-norm (or l2norm, Euclidean norm) of all elements in ``x``. The function uses conjugate transpose in the product, hence it always returns a float number.</p></dd></dl><dl><dt class="spec value" id="val-vecnorm"><a href="#val-vecnorm" class="anchor"></a><code><span class="keyword">val</span> vecnorm : <span>?&#8288;axis:int</span> <span>&#45;&gt;</span> <span>?&#8288;p:float</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``vecnorm ~axis ~p x`` calculates the generalised vector p-norm along the specified ``axis``. The generalised p-norm is defined as below.</p><p>.. math:: ||v||_p = \Big<code> \sum_{k=0}^{N-1} |v_k|^p \Big</code>^</p><h2 id="/p"><a href="#/p" class="anchor"></a>/p</h2><p>Parameters: * ``axis`` is the axis for reduction. * ``p`` is order of norm, default value is 2. * ``x`` is the input ndarray.</p><p>Returns: * If ``p = infinity``, then returns :math:`||v||_<code>\infty</code> = \max_i(|v(i)|)`. * If ``p = -infinity``, then returns :math:`||v||_</p><p>\infty</p><p>}</p><p>= \min_i(|v(i)|)`. * Otherwise returns generalised vector p-norm defined above.</p></dd></dl><dl><dt class="spec value" id="val-vecnorm'"><a href="#val-vecnorm'" class="anchor"></a><code><span class="keyword">val</span> vecnorm' : <span>?&#8288;p:float</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span></code></dt><dd><p>``vecnorm'`` flattens the input into 1-d vector first, then calculates the generalised p-norm the same as ``venorm``.</p></dd></dl><dl><dt class="spec value" id="val-cumsum"><a href="#val-cumsum" class="anchor"></a><code><span class="keyword">val</span> cumsum : <span>?&#8288;axis:int</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``cumsum ~axis x`` : performs cumulative sum of the elements along the given axis ``~axis``. If ``~axis`` is ``None``, then the ``cumsum`` is performed along the lowest dimension. The returned result however always remains the same shape.</p></dd></dl><dl><dt class="spec value" id="val-cumprod"><a href="#val-cumprod" class="anchor"></a><code><span class="keyword">val</span> cumprod : <span>?&#8288;axis:int</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``cumprod ~axis x`` : similar to ``cumsum`` but performs cumulative product of the elements along the given ``~axis``.</p></dd></dl><dl><dt class="spec value" id="val-cummin"><a href="#val-cummin" class="anchor"></a><code><span class="keyword">val</span> cummin : <span>?&#8288;axis:int</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``cummin ~axis x`` : performs cumulative ``min`` along ``axis`` dimension.</p></dd></dl><dl><dt class="spec value" id="val-cummax"><a href="#val-cummax" class="anchor"></a><code><span class="keyword">val</span> cummax : <span>?&#8288;axis:int</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``cummax ~axis x`` : performs cumulative ``max`` along ``axis`` dimension.</p></dd></dl><dl><dt class="spec value" id="val-diff"><a href="#val-diff" class="anchor"></a><code><span class="keyword">val</span> diff : <span>?&#8288;axis:int</span> <span>&#45;&gt;</span> <span>?&#8288;n:int</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``diff ~axis ~n x`` calculates the ``n``-th difference of ``x`` along the specified ``axis``.</p><p>Parameters: * ``axis``: axis to calculate the difference. The default value is the highest dimension. * ``n``: how many times to calculate the difference. The default value is 1.</p><p>Return: * The difference ndarray y. Note that the shape of ``y`` 1 less than that of ``x`` along specified axis.</p></dd></dl><dl><dt class="spec value" id="val-angle"><a href="#val-angle" class="anchor"></a><code><span class="keyword">val</span> angle : <span><span>(Stdlib.Complex.t, <span class="type-var">'a</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(Stdlib.Complex.t, <span class="type-var">'a</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``angle x`` calculates the phase angle of all complex numbers in ``x``.</p></dd></dl><dl><dt class="spec value" id="val-proj"><a href="#val-proj" class="anchor"></a><code><span class="keyword">val</span> proj : <span><span>(Stdlib.Complex.t, <span class="type-var">'a</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(Stdlib.Complex.t, <span class="type-var">'a</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``proj x`` computes the projection on Riemann sphere of all elelments in ``x``.</p></dd></dl><dl><dt class="spec value" id="val-lgamma"><a href="#val-lgamma" class="anchor"></a><code><span class="keyword">val</span> lgamma : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``lgamma x`` computes the loggamma of the elements in ``x`` and returns the result in a new ndarray.</p></dd></dl></section><section><header><h6 id="binary-math-operators"><a href="#binary-math-operators" class="anchor"></a>Binary math operators</h6></header><dl><dt class="spec value" id="val-add"><a href="#val-add" class="anchor"></a><code><span class="keyword">val</span> add : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``add x y`` adds all the elements in ``x`` and ``y`` elementwise, and returns the result in a new ndarray.</p><p>General broadcast operation is automatically applied to add/sub/mul/div, etc. The function compares the dimension element-wise from the highest to the lowest with the following broadcast rules (same as numpy): 1. equal; 2. either is 1.</p></dd></dl><dl><dt class="spec value" id="val-sub"><a href="#val-sub" class="anchor"></a><code><span class="keyword">val</span> sub : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``sub x y`` subtracts all the elements in ``x`` and ``y`` elementwise, and returns the result in a new ndarray.</p></dd></dl><dl><dt class="spec value" id="val-mul"><a href="#val-mul" class="anchor"></a><code><span class="keyword">val</span> mul : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``mul x y`` multiplies all the elements in ``x`` and ``y`` elementwise, and returns the result in a new ndarray.</p></dd></dl><dl><dt class="spec value" id="val-div"><a href="#val-div" class="anchor"></a><code><span class="keyword">val</span> div : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``div x y`` divides all the elements in ``x`` and ``y`` elementwise, and returns the result in a new ndarray.</p></dd></dl><dl><dt class="spec value" id="val-add_scalar"><a href="#val-add_scalar" class="anchor"></a><code><span class="keyword">val</span> add_scalar : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``add_scalar x a`` adds a scalar value ``a`` to each element in ``x``, and returns the result in a new ndarray.</p></dd></dl><dl><dt class="spec value" id="val-sub_scalar"><a href="#val-sub_scalar" class="anchor"></a><code><span class="keyword">val</span> sub_scalar : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``sub_scalar x a`` subtracts a scalar value ``a`` from each element in ``x``, and returns the result in a new ndarray.</p></dd></dl><dl><dt class="spec value" id="val-mul_scalar"><a href="#val-mul_scalar" class="anchor"></a><code><span class="keyword">val</span> mul_scalar : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``mul_scalar x a`` multiplies each element in ``x`` by a scalar value ``a``, and returns the result in a new ndarray.</p></dd></dl><dl><dt class="spec value" id="val-div_scalar"><a href="#val-div_scalar" class="anchor"></a><code><span class="keyword">val</span> div_scalar : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``div_scalar x a`` divides each element in ``x`` by a scalar value ``a``, and returns the result in a new ndarray.</p></dd></dl><dl><dt class="spec value" id="val-scalar_add"><a href="#val-scalar_add" class="anchor"></a><code><span class="keyword">val</span> scalar_add : <span class="type-var">'a</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``scalar_add a x`` adds a scalar value ``a`` to each element in ``x``, and returns the result in a new ndarray.</p></dd></dl><dl><dt class="spec value" id="val-scalar_sub"><a href="#val-scalar_sub" class="anchor"></a><code><span class="keyword">val</span> scalar_sub : <span class="type-var">'a</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``scalar_sub a x`` subtracts each element in ``x`` from a scalar value ``a``, and returns the result in a new ndarray.</p></dd></dl><dl><dt class="spec value" id="val-scalar_mul"><a href="#val-scalar_mul" class="anchor"></a><code><span class="keyword">val</span> scalar_mul : <span class="type-var">'a</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``scalar_mul a x`` multiplies each element in ``x`` by a scalar value ``a``, and returns the result in a new ndarray.</p></dd></dl><dl><dt class="spec value" id="val-scalar_div"><a href="#val-scalar_div" class="anchor"></a><code><span class="keyword">val</span> scalar_div : <span class="type-var">'a</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``scalar_div a x`` divides a scalar value ``a`` by each element in ``x``, and returns the result in a new ndarray.</p></dd></dl><dl><dt class="spec value" id="val-pow"><a href="#val-pow" class="anchor"></a><code><span class="keyword">val</span> pow : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``pow x y`` computes ``pow(a, b)`` of all the elements in ``x`` and ``y`` elementwise, and returns the result in a new ndarray.</p></dd></dl><dl><dt class="spec value" id="val-scalar_pow"><a href="#val-scalar_pow" class="anchor"></a><code><span class="keyword">val</span> scalar_pow : <span class="type-var">'a</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``scalar_pow a x`` computes the power value of a scalar value ``a`` using the elements in a ndarray ``x``.</p></dd></dl><dl><dt class="spec value" id="val-pow_scalar"><a href="#val-pow_scalar" class="anchor"></a><code><span class="keyword">val</span> pow_scalar : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``pow_scalar x a`` computes each element in ``x`` power to ``a``.</p></dd></dl><dl><dt class="spec value" id="val-atan2"><a href="#val-atan2" class="anchor"></a><code><span class="keyword">val</span> atan2 : <span><span>(float, <span class="type-var">'a</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(float, <span class="type-var">'a</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(float, <span class="type-var">'a</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``atan2 x y`` computes ``atan2(a, b)`` of all the elements in ``x`` and ``y`` elementwise, and returns the result in a new ndarray.</p></dd></dl><dl><dt class="spec value" id="val-scalar_atan2"><a href="#val-scalar_atan2" class="anchor"></a><code><span class="keyword">val</span> scalar_atan2 : float <span>&#45;&gt;</span> <span><span>(float, <span class="type-var">'a</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(float, <span class="type-var">'a</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``scalar_atan2 a x``</p></dd></dl><dl><dt class="spec value" id="val-atan2_scalar"><a href="#val-atan2_scalar" class="anchor"></a><code><span class="keyword">val</span> atan2_scalar : <span><span>(float, <span class="type-var">'a</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> float <span>&#45;&gt;</span> <span><span>(float, <span class="type-var">'a</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``scalar_atan2 x a``</p></dd></dl><dl><dt class="spec value" id="val-hypot"><a href="#val-hypot" class="anchor"></a><code><span class="keyword">val</span> hypot : <span><span>(float, <span class="type-var">'a</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(float, <span class="type-var">'a</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(float, <span class="type-var">'a</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``hypot x y`` computes ``sqrt(x*x + y*y)`` of all the elements in ``x`` and ``y`` elementwise, and returns the result in a new ndarray.</p></dd></dl><dl><dt class="spec value" id="val-min2"><a href="#val-min2" class="anchor"></a><code><span class="keyword">val</span> min2 : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``min2 x y`` computes the minimum of all the elements in ``x`` and ``y`` elementwise, and returns the result in a new ndarray.</p></dd></dl><dl><dt class="spec value" id="val-max2"><a href="#val-max2" class="anchor"></a><code><span class="keyword">val</span> max2 : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``max2 x y`` computes the maximum of all the elements in ``x`` and ``y`` elementwise, and returns the result in a new ndarray.</p></dd></dl><dl><dt class="spec value" id="val-fmod"><a href="#val-fmod" class="anchor"></a><code><span class="keyword">val</span> fmod : <span><span>(float, <span class="type-var">'a</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(float, <span class="type-var">'a</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(float, <span class="type-var">'a</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``fmod x y`` performs float mod division.</p></dd></dl><dl><dt class="spec value" id="val-fmod_scalar"><a href="#val-fmod_scalar" class="anchor"></a><code><span class="keyword">val</span> fmod_scalar : <span><span>(float, <span class="type-var">'a</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> float <span>&#45;&gt;</span> <span><span>(float, <span class="type-var">'a</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``fmod_scalar x a`` performs mod division between ``x`` and scalar ``a``.</p></dd></dl><dl><dt class="spec value" id="val-scalar_fmod"><a href="#val-scalar_fmod" class="anchor"></a><code><span class="keyword">val</span> scalar_fmod : float <span>&#45;&gt;</span> <span><span>(float, <span class="type-var">'a</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(float, <span class="type-var">'a</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``scalar_fmod x a`` performs mod division between scalar ``a`` and ``x``.</p></dd></dl><dl><dt class="spec value" id="val-ssqr'"><a href="#val-ssqr'" class="anchor"></a><code><span class="keyword">val</span> ssqr' : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> <span class="type-var">'a</span></code></dt><dd><p>``ssqr x a`` computes the sum of squared differences of all the elements in ``x`` from constant ``a``. This function only computes the square of each element rather than the conjugate transpose as <a href="index.html#val-l2norm_sqr"><code>l2norm_sqr</code></a> does.</p></dd></dl><dl><dt class="spec value" id="val-ssqr_diff'"><a href="#val-ssqr_diff'" class="anchor"></a><code><span class="keyword">val</span> ssqr_diff' : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span></code></dt><dd><p>``ssqr_diff x y`` computes the sum of squared differences of every elements in ``x`` and its corresponding element in ``y``.</p></dd></dl><dl><dt class="spec value" id="val-cross_entropy'"><a href="#val-cross_entropy'" class="anchor"></a><code><span class="keyword">val</span> cross_entropy' : <span><span>(float, <span class="type-var">'a</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(float, <span class="type-var">'a</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> float</code></dt><dd><p>``cross_entropy x y`` calculates the cross entropy between ``x`` and ``y`` using base ``e``.</p></dd></dl><dl><dt class="spec value" id="val-clip_by_value"><a href="#val-clip_by_value" class="anchor"></a><code><span class="keyword">val</span> clip_by_value : <span>?&#8288;amin:<span class="type-var">'a</span></span> <span>&#45;&gt;</span> <span>?&#8288;amax:<span class="type-var">'a</span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``clip_by_value ~amin ~amax x`` clips the elements in ``x`` based on ``amin`` and ``amax``. The elements smaller than ``amin`` will be set to ``amin``, and the elements greater than ``amax`` will be set to ``amax``.</p></dd></dl><dl><dt class="spec value" id="val-clip_by_l2norm"><a href="#val-clip_by_l2norm" class="anchor"></a><code><span class="keyword">val</span> clip_by_l2norm : <span class="type-var">'a</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``clip_by_l2norm t x`` clips the ``x`` according to the threshold set by ``t``.</p></dd></dl><dl><dt class="spec value" id="val-fma"><a href="#val-fma" class="anchor"></a><code><span class="keyword">val</span> fma : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``fma x y z`` calculates the `fused multiply add`, i.e. ``(x * y) + z``.</p></dd></dl></section><section><header><h6 id="tensor-calculus"><a href="#tensor-calculus" class="anchor"></a>Tensor Calculus</h6></header><dl><dt class="spec value" id="val-contract1"><a href="#val-contract1" class="anchor"></a><code><span class="keyword">val</span> contract1 : <span><span>(int * int)</span> array</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``contract1 index_pairs x`` performs indices contraction (a.k.a tensor contraction) on ``x``. ``index_pairs`` is an array of contracted indices.</p><p>Caveat: Not well tested yet, use with care! Also, consider to use TTGT in future for better perfomance.</p></dd></dl><dl><dt class="spec value" id="val-contract2"><a href="#val-contract2" class="anchor"></a><code><span class="keyword">val</span> contract2 : <span><span>(int * int)</span> array</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``contract2 index_pairs x y`` performs indices contraction (a.k.a tensor contraction) on two ndarrays ``x`` and ``y``. ``index_pairs`` is an array of contracted indices, the first element is the index of ``x``, the second is that of ``y``.</p><p>Caveat: Not well tested yet, use with care! Also, consider to use TTGT in future for better perfomance.</p></dd></dl></section><section><header><h6 id="cast-functions"><a href="#cast-functions" class="anchor"></a>Cast functions</h6></header><dl><dt class="spec value" id="val-cast"><a href="#val-cast" class="anchor"></a><code><span class="keyword">val</span> cast : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-kind">kind</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'c</span>, <span class="type-var">'d</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``cast kind x`` casts ``x`` of type ``('c, 'd) t`` to type ``('a, 'b) t`` specify by the passed in ``kind`` parameter. This function is a generalisation of the other casting functions such as ``cast_s2d``, ``cast_c2z``, and etc.</p></dd></dl><dl><dt class="spec value" id="val-cast_s2d"><a href="#val-cast_s2d" class="anchor"></a><code><span class="keyword">val</span> cast_s2d : <span><span>(float, Stdlib.Bigarray.float32_elt)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(float, Stdlib.Bigarray.float64_elt)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``cast_s2d x`` casts ``x`` from ``float32`` to ``float64``.</p></dd></dl><dl><dt class="spec value" id="val-cast_d2s"><a href="#val-cast_d2s" class="anchor"></a><code><span class="keyword">val</span> cast_d2s : <span><span>(float, Stdlib.Bigarray.float64_elt)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(float, Stdlib.Bigarray.float32_elt)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``cast_d2s x`` casts ``x`` from ``float64`` to ``float32``.</p></dd></dl><dl><dt class="spec value" id="val-cast_c2z"><a href="#val-cast_c2z" class="anchor"></a><code><span class="keyword">val</span> cast_c2z : <span><span>(Stdlib.Complex.t, Stdlib.Bigarray.complex32_elt)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(Stdlib.Complex.t, Stdlib.Bigarray.complex64_elt)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``cast_c2z x`` casts ``x`` from ``complex32`` to ``complex64``.</p></dd></dl><dl><dt class="spec value" id="val-cast_z2c"><a href="#val-cast_z2c" class="anchor"></a><code><span class="keyword">val</span> cast_z2c : <span><span>(Stdlib.Complex.t, Stdlib.Bigarray.complex64_elt)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(Stdlib.Complex.t, Stdlib.Bigarray.complex32_elt)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``cast_z2c x`` casts ``x`` from ``complex64`` to ``complex32``.</p></dd></dl><dl><dt class="spec value" id="val-cast_s2c"><a href="#val-cast_s2c" class="anchor"></a><code><span class="keyword">val</span> cast_s2c : <span><span>(float, Stdlib.Bigarray.float32_elt)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(Stdlib.Complex.t, Stdlib.Bigarray.complex32_elt)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``cast_s2c x`` casts ``x`` from ``float32`` to ``complex32``.</p></dd></dl><dl><dt class="spec value" id="val-cast_d2z"><a href="#val-cast_d2z" class="anchor"></a><code><span class="keyword">val</span> cast_d2z : <span><span>(float, Stdlib.Bigarray.float64_elt)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(Stdlib.Complex.t, Stdlib.Bigarray.complex64_elt)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``cast_d2z x`` casts ``x`` from ``float64`` to ``complex64``.</p></dd></dl><dl><dt class="spec value" id="val-cast_s2z"><a href="#val-cast_s2z" class="anchor"></a><code><span class="keyword">val</span> cast_s2z : <span><span>(float, Stdlib.Bigarray.float32_elt)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(Stdlib.Complex.t, Stdlib.Bigarray.complex64_elt)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``cast_s2z x`` casts ``x`` from ``float32`` to ``complex64``.</p></dd></dl><dl><dt class="spec value" id="val-cast_d2c"><a href="#val-cast_d2c" class="anchor"></a><code><span class="keyword">val</span> cast_d2c : <span><span>(float, Stdlib.Bigarray.float64_elt)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(Stdlib.Complex.t, Stdlib.Bigarray.complex32_elt)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``cast_d2c x`` casts ``x`` from ``float64`` to ``complex32``.</p></dd></dl></section><section><header><h6 id="neural-network-related"><a href="#neural-network-related" class="anchor"></a>Neural network related</h6></header><dl><dt class="spec value" id="val-conv1d"><a href="#val-conv1d" class="anchor"></a><code><span class="keyword">val</span> conv1d : <span>?&#8288;padding:<a href="../../../owl-base/Owl_types/index.html#type-padding">Owl_types.padding</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>TODO</p></dd></dl><dl><dt class="spec value" id="val-conv2d"><a href="#val-conv2d" class="anchor"></a><code><span class="keyword">val</span> conv2d : <span>?&#8288;padding:<a href="../../../owl-base/Owl_types/index.html#type-padding">Owl_types.padding</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>TODO</p></dd></dl><dl><dt class="spec value" id="val-conv3d"><a href="#val-conv3d" class="anchor"></a><code><span class="keyword">val</span> conv3d : <span>?&#8288;padding:<a href="../../../owl-base/Owl_types/index.html#type-padding">Owl_types.padding</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>TODO</p></dd></dl><dl><dt class="spec value" id="val-dilated_conv1d"><a href="#val-dilated_conv1d" class="anchor"></a><code><span class="keyword">val</span> dilated_conv1d : <span>?&#8288;padding:<a href="../../../owl-base/Owl_types/index.html#type-padding">Owl_types.padding</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>TODO</p></dd></dl><dl><dt class="spec value" id="val-dilated_conv2d"><a href="#val-dilated_conv2d" class="anchor"></a><code><span class="keyword">val</span> dilated_conv2d : <span>?&#8288;padding:<a href="../../../owl-base/Owl_types/index.html#type-padding">Owl_types.padding</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>TODO</p></dd></dl><dl><dt class="spec value" id="val-dilated_conv3d"><a href="#val-dilated_conv3d" class="anchor"></a><code><span class="keyword">val</span> dilated_conv3d : <span>?&#8288;padding:<a href="../../../owl-base/Owl_types/index.html#type-padding">Owl_types.padding</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>TODO</p></dd></dl><dl><dt class="spec value" id="val-transpose_conv1d"><a href="#val-transpose_conv1d" class="anchor"></a><code><span class="keyword">val</span> transpose_conv1d : <span>?&#8288;padding:<a href="../../../owl-base/Owl_types/index.html#type-padding">Owl_types.padding</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>TODO</p></dd></dl><dl><dt class="spec value" id="val-transpose_conv2d"><a href="#val-transpose_conv2d" class="anchor"></a><code><span class="keyword">val</span> transpose_conv2d : <span>?&#8288;padding:<a href="../../../owl-base/Owl_types/index.html#type-padding">Owl_types.padding</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>TODO</p></dd></dl><dl><dt class="spec value" id="val-transpose_conv3d"><a href="#val-transpose_conv3d" class="anchor"></a><code><span class="keyword">val</span> transpose_conv3d : <span>?&#8288;padding:<a href="../../../owl-base/Owl_types/index.html#type-padding">Owl_types.padding</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>TODO</p></dd></dl><dl><dt class="spec value" id="val-max_pool1d"><a href="#val-max_pool1d" class="anchor"></a><code><span class="keyword">val</span> max_pool1d : <span>?&#8288;padding:<a href="../../../owl-base/Owl_types/index.html#type-padding">Owl_types.padding</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>TODO</p></dd></dl><dl><dt class="spec value" id="val-max_pool2d"><a href="#val-max_pool2d" class="anchor"></a><code><span class="keyword">val</span> max_pool2d : <span>?&#8288;padding:<a href="../../../owl-base/Owl_types/index.html#type-padding">Owl_types.padding</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>TODO</p></dd></dl><dl><dt class="spec value" id="val-max_pool3d"><a href="#val-max_pool3d" class="anchor"></a><code><span class="keyword">val</span> max_pool3d : <span>?&#8288;padding:<a href="../../../owl-base/Owl_types/index.html#type-padding">Owl_types.padding</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>TODO</p></dd></dl><dl><dt class="spec value" id="val-avg_pool1d"><a href="#val-avg_pool1d" class="anchor"></a><code><span class="keyword">val</span> avg_pool1d : <span>?&#8288;padding:<a href="../../../owl-base/Owl_types/index.html#type-padding">Owl_types.padding</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>TODO</p></dd></dl><dl><dt class="spec value" id="val-avg_pool2d"><a href="#val-avg_pool2d" class="anchor"></a><code><span class="keyword">val</span> avg_pool2d : <span>?&#8288;padding:<a href="../../../owl-base/Owl_types/index.html#type-padding">Owl_types.padding</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>TODO</p></dd></dl><dl><dt class="spec value" id="val-avg_pool3d"><a href="#val-avg_pool3d" class="anchor"></a><code><span class="keyword">val</span> avg_pool3d : <span>?&#8288;padding:<a href="../../../owl-base/Owl_types/index.html#type-padding">Owl_types.padding</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>TODO</p></dd></dl><dl><dt class="spec value" id="val-max_pool2d_argmax"><a href="#val-max_pool2d_argmax" class="anchor"></a><code><span class="keyword">val</span> max_pool2d_argmax : <span>?&#8288;padding:<a href="../../../owl-base/Owl_types/index.html#type-padding">Owl_types.padding</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> * <span><span>(int64, Stdlib.Bigarray.int64_elt)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>TODO</p></dd></dl><dl><dt class="spec value" id="val-upsampling2d"><a href="#val-upsampling2d" class="anchor"></a><code><span class="keyword">val</span> upsampling2d : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>TODO</p></dd></dl><dl><dt class="spec value" id="val-conv1d_backward_input"><a href="#val-conv1d_backward_input" class="anchor"></a><code><span class="keyword">val</span> conv1d_backward_input : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>TODO</p></dd></dl><dl><dt class="spec value" id="val-conv1d_backward_kernel"><a href="#val-conv1d_backward_kernel" class="anchor"></a><code><span class="keyword">val</span> conv1d_backward_kernel : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>TODO</p></dd></dl><dl><dt class="spec value" id="val-conv2d_backward_input"><a href="#val-conv2d_backward_input" class="anchor"></a><code><span class="keyword">val</span> conv2d_backward_input : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>TODO</p></dd></dl><dl><dt class="spec value" id="val-conv2d_backward_kernel"><a href="#val-conv2d_backward_kernel" class="anchor"></a><code><span class="keyword">val</span> conv2d_backward_kernel : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>TODO</p></dd></dl><dl><dt class="spec value" id="val-conv3d_backward_input"><a href="#val-conv3d_backward_input" class="anchor"></a><code><span class="keyword">val</span> conv3d_backward_input : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>TODO</p></dd></dl><dl><dt class="spec value" id="val-conv3d_backward_kernel"><a href="#val-conv3d_backward_kernel" class="anchor"></a><code><span class="keyword">val</span> conv3d_backward_kernel : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>TODO</p></dd></dl><dl><dt class="spec value" id="val-dilated_conv1d_backward_input"><a href="#val-dilated_conv1d_backward_input" class="anchor"></a><code><span class="keyword">val</span> dilated_conv1d_backward_input : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>TODO</p></dd></dl><dl><dt class="spec value" id="val-dilated_conv1d_backward_kernel"><a href="#val-dilated_conv1d_backward_kernel" class="anchor"></a><code><span class="keyword">val</span> dilated_conv1d_backward_kernel : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>TODO</p></dd></dl><dl><dt class="spec value" id="val-dilated_conv2d_backward_input"><a href="#val-dilated_conv2d_backward_input" class="anchor"></a><code><span class="keyword">val</span> dilated_conv2d_backward_input : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>TODO</p></dd></dl><dl><dt class="spec value" id="val-dilated_conv2d_backward_kernel"><a href="#val-dilated_conv2d_backward_kernel" class="anchor"></a><code><span class="keyword">val</span> dilated_conv2d_backward_kernel : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>TODO</p></dd></dl><dl><dt class="spec value" id="val-dilated_conv3d_backward_input"><a href="#val-dilated_conv3d_backward_input" class="anchor"></a><code><span class="keyword">val</span> dilated_conv3d_backward_input : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>TODO</p></dd></dl><dl><dt class="spec value" id="val-dilated_conv3d_backward_kernel"><a href="#val-dilated_conv3d_backward_kernel" class="anchor"></a><code><span class="keyword">val</span> dilated_conv3d_backward_kernel : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>TODO</p></dd></dl><dl><dt class="spec value" id="val-transpose_conv1d_backward_input"><a href="#val-transpose_conv1d_backward_input" class="anchor"></a><code><span class="keyword">val</span> transpose_conv1d_backward_input : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>TODO</p></dd></dl><dl><dt class="spec value" id="val-transpose_conv1d_backward_kernel"><a href="#val-transpose_conv1d_backward_kernel" class="anchor"></a><code><span class="keyword">val</span> transpose_conv1d_backward_kernel : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>TODO</p></dd></dl><dl><dt class="spec value" id="val-transpose_conv2d_backward_input"><a href="#val-transpose_conv2d_backward_input" class="anchor"></a><code><span class="keyword">val</span> transpose_conv2d_backward_input : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>TODO</p></dd></dl><dl><dt class="spec value" id="val-transpose_conv2d_backward_kernel"><a href="#val-transpose_conv2d_backward_kernel" class="anchor"></a><code><span class="keyword">val</span> transpose_conv2d_backward_kernel : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>TODO</p></dd></dl><dl><dt class="spec value" id="val-transpose_conv3d_backward_input"><a href="#val-transpose_conv3d_backward_input" class="anchor"></a><code><span class="keyword">val</span> transpose_conv3d_backward_input : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>TODO</p></dd></dl><dl><dt class="spec value" id="val-transpose_conv3d_backward_kernel"><a href="#val-transpose_conv3d_backward_kernel" class="anchor"></a><code><span class="keyword">val</span> transpose_conv3d_backward_kernel : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>TODO</p></dd></dl><dl><dt class="spec value" id="val-max_pool1d_backward"><a href="#val-max_pool1d_backward" class="anchor"></a><code><span class="keyword">val</span> max_pool1d_backward : <a href="../../../owl-base/Owl_types/index.html#type-padding">Owl_types.padding</a> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>TODO</p></dd></dl><dl><dt class="spec value" id="val-max_pool2d_backward"><a href="#val-max_pool2d_backward" class="anchor"></a><code><span class="keyword">val</span> max_pool2d_backward : <a href="../../../owl-base/Owl_types/index.html#type-padding">Owl_types.padding</a> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>TODO</p></dd></dl><dl><dt class="spec value" id="val-max_pool3d_backward"><a href="#val-max_pool3d_backward" class="anchor"></a><code><span class="keyword">val</span> max_pool3d_backward : <a href="../../../owl-base/Owl_types/index.html#type-padding">Owl_types.padding</a> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>TODO</p></dd></dl><dl><dt class="spec value" id="val-avg_pool1d_backward"><a href="#val-avg_pool1d_backward" class="anchor"></a><code><span class="keyword">val</span> avg_pool1d_backward : <a href="../../../owl-base/Owl_types/index.html#type-padding">Owl_types.padding</a> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>TODO</p></dd></dl><dl><dt class="spec value" id="val-avg_pool2d_backward"><a href="#val-avg_pool2d_backward" class="anchor"></a><code><span class="keyword">val</span> avg_pool2d_backward : <a href="../../../owl-base/Owl_types/index.html#type-padding">Owl_types.padding</a> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>TODO</p></dd></dl><dl><dt class="spec value" id="val-avg_pool3d_backward"><a href="#val-avg_pool3d_backward" class="anchor"></a><code><span class="keyword">val</span> avg_pool3d_backward : <a href="../../../owl-base/Owl_types/index.html#type-padding">Owl_types.padding</a> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>TODO</p></dd></dl><dl><dt class="spec value" id="val-upsampling2d_backward"><a href="#val-upsampling2d_backward" class="anchor"></a><code><span class="keyword">val</span> upsampling2d_backward : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>TODO</p></dd></dl></section><section><header><h6 id="helper-functions"><a href="#helper-functions" class="anchor"></a>Helper functions</h6></header><aside><p>The following functions are helper functions for some other functions in both Ndarray and Ndview modules. In general, you are not supposed to use these functions directly.</p></aside><dl><dt class="spec value" id="val-print_element"><a href="#val-print_element" class="anchor"></a><code><span class="keyword">val</span> print_element : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-kind">kind</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``print_element kind a`` prints the value of a single element.</p></dd></dl><dl><dt class="spec value" id="val-print_index"><a href="#val-print_index" class="anchor"></a><code><span class="keyword">val</span> print_index : <span>int array</span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``print_index i`` prints out the index of an element.</p></dd></dl><dl><dt class="spec value" id="val-_check_transpose_axis"><a href="#val-_check_transpose_axis" class="anchor"></a><code><span class="keyword">val</span> _check_transpose_axis : <span>int array</span> <span>&#45;&gt;</span> int <span>&#45;&gt;</span> unit</code></dt><dd><p>``_check_transpose_axis a d`` checks whether ``a`` is a legiti('a, 'b) te transpose index.</p></dd></dl><dl><dt class="spec value" id="val-one_hot"><a href="#val-one_hot" class="anchor"></a><code><span class="keyword">val</span> one_hot : int <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``one_hot idx depth`` creates one-hot vectors according to the indices ndarray and the specified depth. If ``idx`` is rank N, then the return is rank N+1. More specifically, if ``idx`` is of shape ``<code>|a;b;c|</code>``, the return is of shape ``<code>|a;b;c;depth|</code>``.</p></dd></dl><dl><dt class="spec value" id="val-sum_slices"><a href="#val-sum_slices" class="anchor"></a><code><span class="keyword">val</span> sum_slices : <span>?&#8288;axis:int</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``sum_slices ~axis:2 x`` for ``x`` of ``<code>|2;3;4;5|</code>``, it returns an ndarray of shape ``<code>|4;5|</code>``. Currently, the operation is done using ``gemm``, it is fast but consumes more memory.</p></dd></dl><dl><dt class="spec value" id="val-slide"><a href="#val-slide" class="anchor"></a><code><span class="keyword">val</span> slide : <span>?&#8288;axis:int</span> <span>&#45;&gt;</span> <span>?&#8288;ofs:int</span> <span>&#45;&gt;</span> <span>?&#8288;step:int</span> <span>&#45;&gt;</span> <span>window:int</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``slide ~axis ~window x`` generates a new ndarray by sliding a window along specified ``axis`` in ``x``. E.g., if ``x`` has shape ``<code>|a;b;c|</code>`` and ``axis = 1``, then ``<code>|a; number of windows; window; c|</code>`` is the shape of the returned ndarray.</p><p>Parameters: * ``axis`` is the axis for sliding, the default is -1, i.e. highest dimension. * ``ofs`` is the starting position of the sliding window. The default is 0. * ``step`` is the step size, the default is 1. * ``window`` is the size of the sliding window.</p></dd></dl></section><section><header><h6 id="in-place-modification"><a href="#in-place-modification" class="anchor"></a>In-place modification</h6></header><dl><dt class="spec value" id="val-create_"><a href="#val-create_" class="anchor"></a><code><span class="keyword">val</span> create_ : <span>out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> unit</code></dt><dd><p>TODO</p></dd></dl><dl><dt class="spec value" id="val-uniform_"><a href="#val-uniform_" class="anchor"></a><code><span class="keyword">val</span> uniform_ : <span>?&#8288;a:<span class="type-var">'a</span></span> <span>&#45;&gt;</span> <span>?&#8288;b:<span class="type-var">'a</span></span> <span>&#45;&gt;</span> <span>out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>TODO</p></dd></dl><dl><dt class="spec value" id="val-gaussian_"><a href="#val-gaussian_" class="anchor"></a><code><span class="keyword">val</span> gaussian_ : <span>?&#8288;mu:<span class="type-var">'a</span></span> <span>&#45;&gt;</span> <span>?&#8288;sigma:<span class="type-var">'a</span></span> <span>&#45;&gt;</span> <span>out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>TODO</p></dd></dl><dl><dt class="spec value" id="val-sequential_"><a href="#val-sequential_" class="anchor"></a><code><span class="keyword">val</span> sequential_ : <span>?&#8288;a:<span class="type-var">'a</span></span> <span>&#45;&gt;</span> <span>?&#8288;step:<span class="type-var">'a</span></span> <span>&#45;&gt;</span> <span>out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>TODO</p></dd></dl><dl><dt class="spec value" id="val-bernoulli_"><a href="#val-bernoulli_" class="anchor"></a><code><span class="keyword">val</span> bernoulli_ : <span>?&#8288;p:float</span> <span>&#45;&gt;</span> <span>out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>TODO</p></dd></dl><dl><dt class="spec value" id="val-zeros_"><a href="#val-zeros_" class="anchor"></a><code><span class="keyword">val</span> zeros_ : <span>out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>TODO</p></dd></dl><dl><dt class="spec value" id="val-ones_"><a href="#val-ones_" class="anchor"></a><code><span class="keyword">val</span> ones_ : <span>out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>TODO</p></dd></dl><dl><dt class="spec value" id="val-one_hot_"><a href="#val-one_hot_" class="anchor"></a><code><span class="keyword">val</span> one_hot_ : <span>out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> int <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>TODO</p></dd></dl><dl><dt class="spec value" id="val-sort_"><a href="#val-sort_" class="anchor"></a><code><span class="keyword">val</span> sort_ : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``sort_ x`` performs in-place quicksort of the elelments in ``x``.</p></dd></dl><dl><dt class="spec value" id="val-get_fancy_"><a href="#val-get_fancy_" class="anchor"></a><code><span class="keyword">val</span> get_fancy_ : <span>out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><a href="../../../owl-base/Owl_types/index.html#type-index">Owl_types.index</a> list</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>TODO</p></dd></dl><dl><dt class="spec value" id="val-set_fancy_"><a href="#val-set_fancy_" class="anchor"></a><code><span class="keyword">val</span> set_fancy_ : <span>out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><a href="../../../owl-base/Owl_types/index.html#type-index">Owl_types.index</a> list</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>TODO</p></dd></dl><dl><dt class="spec value" id="val-get_slice_"><a href="#val-get_slice_" class="anchor"></a><code><span class="keyword">val</span> get_slice_ : <span>out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>int list</span> list</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>TODO</p></dd></dl><dl><dt class="spec value" id="val-set_slice_"><a href="#val-set_slice_" class="anchor"></a><code><span class="keyword">val</span> set_slice_ : <span>out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>int list</span> list</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>TODO</p></dd></dl><dl><dt class="spec value" id="val-copy_"><a href="#val-copy_" class="anchor"></a><code><span class="keyword">val</span> copy_ : <span>out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``copy_ ~out src`` copies the data from ndarray ``src`` to destination ``out``.</p></dd></dl><dl><dt class="spec value" id="val-reshape_"><a href="#val-reshape_" class="anchor"></a><code><span class="keyword">val</span> reshape_ : <span>out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>TODO</p></dd></dl><dl><dt class="spec value" id="val-reverse_"><a href="#val-reverse_" class="anchor"></a><code><span class="keyword">val</span> reverse_ : <span>out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>TODO</p></dd></dl><dl><dt class="spec value" id="val-transpose_"><a href="#val-transpose_" class="anchor"></a><code><span class="keyword">val</span> transpose_ : <span>out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span>?&#8288;axis:<span>int array</span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``transpose_ ~out x`` is similar to ``transpose x`` but the output is written to ``out``.</p></dd></dl><dl><dt class="spec value" id="val-repeat_"><a href="#val-repeat_" class="anchor"></a><code><span class="keyword">val</span> repeat_ : <span>out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``repeat_ ~out x reps`` is similar to ``repeat x reps`` but the output is written to ``out``.</p></dd></dl><dl><dt class="spec value" id="val-tile_"><a href="#val-tile_" class="anchor"></a><code><span class="keyword">val</span> tile_ : <span>out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``tile_ ~out x reps`` is similar to ``tile x reps`` but the output is written to ``out``.</p></dd></dl><dl><dt class="spec value" id="val-pad_"><a href="#val-pad_" class="anchor"></a><code><span class="keyword">val</span> pad_ : <span>out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span>?&#8288;v:<span class="type-var">'a</span></span> <span>&#45;&gt;</span> <span><span>int list</span> list</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``pad_ ~out ?v p x`` is similar to ``pad ?v p x`` but the output is written to ``out``.</p></dd></dl><dl><dt class="spec value" id="val-sum_"><a href="#val-sum_" class="anchor"></a><code><span class="keyword">val</span> sum_ : <span>out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span>axis:int</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>TODO</p></dd></dl><dl><dt class="spec value" id="val-min_"><a href="#val-min_" class="anchor"></a><code><span class="keyword">val</span> min_ : <span>out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span>axis:int</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>TODO</p></dd></dl><dl><dt class="spec value" id="val-max_"><a href="#val-max_" class="anchor"></a><code><span class="keyword">val</span> max_ : <span>out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span>axis:int</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>TODO</p></dd></dl><dl><dt class="spec value" id="val-add_"><a href="#val-add_" class="anchor"></a><code><span class="keyword">val</span> add_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``add_ x y`` is simiar to ``add`` function but the output is written to ``out``. You need to make sure ``out`` is big enough to hold the output result.</p></dd></dl><dl><dt class="spec value" id="val-sub_"><a href="#val-sub_" class="anchor"></a><code><span class="keyword">val</span> sub_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``sub_ x y`` is simiar to ``sub`` function but the output is written to ``out``. You need to make sure ``out`` is big enough to hold the output result.</p></dd></dl><dl><dt class="spec value" id="val-mul_"><a href="#val-mul_" class="anchor"></a><code><span class="keyword">val</span> mul_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``mul_ x y`` is simiar to ``mul`` function but the output is written to ``out``. You need to make sure ``out`` is big enough to hold the output result.</p></dd></dl><dl><dt class="spec value" id="val-div_"><a href="#val-div_" class="anchor"></a><code><span class="keyword">val</span> div_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``div_ x y`` is simiar to ``div`` function but the output is written to ``out``. You need to make sure ``out`` is big enough to hold the output result.</p></dd></dl><dl><dt class="spec value" id="val-pow_"><a href="#val-pow_" class="anchor"></a><code><span class="keyword">val</span> pow_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``pow_ x y`` is simiar to ``pow`` function but the output is written to ``out``. You need to make sure ``out`` is big enough to hold the output result.</p></dd></dl><dl><dt class="spec value" id="val-atan2_"><a href="#val-atan2_" class="anchor"></a><code><span class="keyword">val</span> atan2_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``atan2_ x y`` is simiar to ``atan2`` function but the output is written to ``out``. You need to make sure ``out`` is big enough to hold the output result.</p></dd></dl><dl><dt class="spec value" id="val-hypot_"><a href="#val-hypot_" class="anchor"></a><code><span class="keyword">val</span> hypot_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``hypot_ x y`` is simiar to ``hypot`` function but the output is written to ``out``. You need to make sure ``out`` is big enough to hold the output result.</p></dd></dl><dl><dt class="spec value" id="val-fmod_"><a href="#val-fmod_" class="anchor"></a><code><span class="keyword">val</span> fmod_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``fmod_ x y`` is simiar to ``fmod`` function but the output is written to ``out``. You need to make sure ``out`` is big enough to hold the output result.</p></dd></dl><dl><dt class="spec value" id="val-min2_"><a href="#val-min2_" class="anchor"></a><code><span class="keyword">val</span> min2_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``min2_ x y`` is simiar to ``min2`` function but the output is written to ``out``. You need to make sure ``out`` is big enough to hold the output result.</p></dd></dl><dl><dt class="spec value" id="val-max2_"><a href="#val-max2_" class="anchor"></a><code><span class="keyword">val</span> max2_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``max2_ x y`` is simiar to ``max2`` function but the output is written to ``out``. You need to make sure ``out`` is big enough to hold the output result.</p></dd></dl><dl><dt class="spec value" id="val-add_scalar_"><a href="#val-add_scalar_" class="anchor"></a><code><span class="keyword">val</span> add_scalar_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``add_scalar_ x y`` is simiar to ``add_scalar`` function but the output is written to ``x``.</p></dd></dl><dl><dt class="spec value" id="val-sub_scalar_"><a href="#val-sub_scalar_" class="anchor"></a><code><span class="keyword">val</span> sub_scalar_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``sub_scalar_ x y`` is simiar to ``sub_scalar`` function but the output is written to ``x``.</p></dd></dl><dl><dt class="spec value" id="val-mul_scalar_"><a href="#val-mul_scalar_" class="anchor"></a><code><span class="keyword">val</span> mul_scalar_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``mul_scalar_ x y`` is simiar to ``mul_scalar`` function but the output is written to ``x``.</p></dd></dl><dl><dt class="spec value" id="val-div_scalar_"><a href="#val-div_scalar_" class="anchor"></a><code><span class="keyword">val</span> div_scalar_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``div_scalar_ x y`` is simiar to ``div_scalar`` function but the output is written to ``x``.</p></dd></dl><dl><dt class="spec value" id="val-pow_scalar_"><a href="#val-pow_scalar_" class="anchor"></a><code><span class="keyword">val</span> pow_scalar_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``pow_scalar_ x y`` is simiar to ``pow_scalar`` function but the output is written to ``x``.</p></dd></dl><dl><dt class="spec value" id="val-atan2_scalar_"><a href="#val-atan2_scalar_" class="anchor"></a><code><span class="keyword">val</span> atan2_scalar_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``atan2_scalar_ x y`` is simiar to ``atan2_scalar`` function but the output is written to ``x``.</p></dd></dl><dl><dt class="spec value" id="val-fmod_scalar_"><a href="#val-fmod_scalar_" class="anchor"></a><code><span class="keyword">val</span> fmod_scalar_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``fmod_scalar_ x y`` is simiar to ``fmod_scalar`` function but the output is written to ``x``.</p></dd></dl><dl><dt class="spec value" id="val-scalar_add_"><a href="#val-scalar_add_" class="anchor"></a><code><span class="keyword">val</span> scalar_add_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``scalar_add_ a x`` is simiar to ``scalar_add`` function but the output is written to ``x``.</p></dd></dl><dl><dt class="spec value" id="val-scalar_sub_"><a href="#val-scalar_sub_" class="anchor"></a><code><span class="keyword">val</span> scalar_sub_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``scalar_sub_ a x`` is simiar to ``scalar_sub`` function but the output is written to ``x``.</p></dd></dl><dl><dt class="spec value" id="val-scalar_mul_"><a href="#val-scalar_mul_" class="anchor"></a><code><span class="keyword">val</span> scalar_mul_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``scalar_mul_ a x`` is simiar to ``scalar_mul`` function but the output is written to ``x``.</p></dd></dl><dl><dt class="spec value" id="val-scalar_div_"><a href="#val-scalar_div_" class="anchor"></a><code><span class="keyword">val</span> scalar_div_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``scalar_div_ a x`` is simiar to ``scalar_div`` function but the output is written to ``x``.</p></dd></dl><dl><dt class="spec value" id="val-scalar_pow_"><a href="#val-scalar_pow_" class="anchor"></a><code><span class="keyword">val</span> scalar_pow_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``scalar_pow_ a x`` is simiar to ``scalar_pow`` function but the output is written to ``x``.</p></dd></dl><dl><dt class="spec value" id="val-scalar_atan2_"><a href="#val-scalar_atan2_" class="anchor"></a><code><span class="keyword">val</span> scalar_atan2_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``scalar_atan2_ a x`` is simiar to ``scalar_atan2`` function but the output is written to ``x``.</p></dd></dl><dl><dt class="spec value" id="val-scalar_fmod_"><a href="#val-scalar_fmod_" class="anchor"></a><code><span class="keyword">val</span> scalar_fmod_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``scalar_fmod_ a x`` is simiar to ``scalar_fmod`` function but the output is written to ``x``.</p></dd></dl><dl><dt class="spec value" id="val-clip_by_value_"><a href="#val-clip_by_value_" class="anchor"></a><code><span class="keyword">val</span> clip_by_value_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span>?&#8288;amin:<span class="type-var">'a</span></span> <span>&#45;&gt;</span> <span>?&#8288;amax:<span class="type-var">'a</span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>TODO</p></dd></dl><dl><dt class="spec value" id="val-clip_by_l2norm_"><a href="#val-clip_by_l2norm_" class="anchor"></a><code><span class="keyword">val</span> clip_by_l2norm_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>TODO</p></dd></dl><dl><dt class="spec value" id="val-fma_"><a href="#val-fma_" class="anchor"></a><code><span class="keyword">val</span> fma_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``fma_ ~out x y z`` is simiar to ``fma x y z`` function but the output is written to ``out``.</p></dd></dl><dl><dt class="spec value" id="val-dot_"><a href="#val-dot_" class="anchor"></a><code><span class="keyword">val</span> dot_ : <span>?&#8288;transa:bool</span> <span>&#45;&gt;</span> <span>?&#8288;transb:bool</span> <span>&#45;&gt;</span> <span>?&#8288;alpha:<span class="type-var">'a</span></span> <span>&#45;&gt;</span> <span>?&#8288;beta:<span class="type-var">'a</span></span> <span>&#45;&gt;</span> <span>c:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>Refer to :doc:`owl_dense_matrix_generic`</p></dd></dl><dl><dt class="spec value" id="val-conj_"><a href="#val-conj_" class="anchor"></a><code><span class="keyword">val</span> conj_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``conj_ x`` is similar to ``conj`` but output is written to ``x``</p></dd></dl><dl><dt class="spec value" id="val-abs_"><a href="#val-abs_" class="anchor"></a><code><span class="keyword">val</span> abs_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``abs_ x`` is similar to ``abs`` but output is written to ``x``</p></dd></dl><dl><dt class="spec value" id="val-neg_"><a href="#val-neg_" class="anchor"></a><code><span class="keyword">val</span> neg_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``neg_ x`` is similar to ``neg`` but output is written to ``x``</p></dd></dl><dl><dt class="spec value" id="val-reci_"><a href="#val-reci_" class="anchor"></a><code><span class="keyword">val</span> reci_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``reci_ x`` is similar to ``reci`` but output is written to ``x``</p></dd></dl><dl><dt class="spec value" id="val-signum_"><a href="#val-signum_" class="anchor"></a><code><span class="keyword">val</span> signum_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``signum_ x`` is similar to ``signum`` but output is written to ``x``</p></dd></dl><dl><dt class="spec value" id="val-sqr_"><a href="#val-sqr_" class="anchor"></a><code><span class="keyword">val</span> sqr_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``sqr_ x`` is similar to ``sqr`` but output is written to ``x``</p></dd></dl><dl><dt class="spec value" id="val-sqrt_"><a href="#val-sqrt_" class="anchor"></a><code><span class="keyword">val</span> sqrt_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``sqrt_ x`` is similar to ``sqrt`` but output is written to ``x``</p></dd></dl><dl><dt class="spec value" id="val-cbrt_"><a href="#val-cbrt_" class="anchor"></a><code><span class="keyword">val</span> cbrt_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``cbrt_ x`` is similar to ``cbrt`` but output is written to ``x``</p></dd></dl><dl><dt class="spec value" id="val-exp_"><a href="#val-exp_" class="anchor"></a><code><span class="keyword">val</span> exp_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``exp_ x`` is similar to ``exp_`` but output is written to ``x``</p></dd></dl><dl><dt class="spec value" id="val-exp2_"><a href="#val-exp2_" class="anchor"></a><code><span class="keyword">val</span> exp2_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``exp2_ x`` is similar to ``exp2`` but output is written to ``x``</p></dd></dl><dl><dt class="spec value" id="val-exp10_"><a href="#val-exp10_" class="anchor"></a><code><span class="keyword">val</span> exp10_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``exp2_ x`` is similar to ``exp2`` but output is written to ``x``</p></dd></dl><dl><dt class="spec value" id="val-expm1_"><a href="#val-expm1_" class="anchor"></a><code><span class="keyword">val</span> expm1_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``expm1_ x`` is similar to ``expm1`` but output is written to ``x``</p></dd></dl><dl><dt class="spec value" id="val-log_"><a href="#val-log_" class="anchor"></a><code><span class="keyword">val</span> log_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``log_ x`` is similar to ``log`` but output is written to ``x``</p></dd></dl><dl><dt class="spec value" id="val-log2_"><a href="#val-log2_" class="anchor"></a><code><span class="keyword">val</span> log2_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``log2_ x`` is similar to ``log2`` but output is written to ``x``</p></dd></dl><dl><dt class="spec value" id="val-log10_"><a href="#val-log10_" class="anchor"></a><code><span class="keyword">val</span> log10_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``log10_ x`` is similar to ``log10`` but output is written to ``x``</p></dd></dl><dl><dt class="spec value" id="val-log1p_"><a href="#val-log1p_" class="anchor"></a><code><span class="keyword">val</span> log1p_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``log1p_ x`` is similar to ``log1p`` but output is written to ``x``</p></dd></dl><dl><dt class="spec value" id="val-sin_"><a href="#val-sin_" class="anchor"></a><code><span class="keyword">val</span> sin_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``sin_ x`` is similar to ``sin`` but output is written to ``x``</p></dd></dl><dl><dt class="spec value" id="val-cos_"><a href="#val-cos_" class="anchor"></a><code><span class="keyword">val</span> cos_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``cos_ x`` is similar to ``cos`` but output is written to ``x``</p></dd></dl><dl><dt class="spec value" id="val-tan_"><a href="#val-tan_" class="anchor"></a><code><span class="keyword">val</span> tan_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``tan_ x`` is similar to ``tan`` but output is written to ``x``</p></dd></dl><dl><dt class="spec value" id="val-asin_"><a href="#val-asin_" class="anchor"></a><code><span class="keyword">val</span> asin_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``asin_ x`` is similar to ``asin`` but output is written to ``x``</p></dd></dl><dl><dt class="spec value" id="val-acos_"><a href="#val-acos_" class="anchor"></a><code><span class="keyword">val</span> acos_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``acos_ x`` is similar to ``acos`` but output is written to ``x``</p></dd></dl><dl><dt class="spec value" id="val-atan_"><a href="#val-atan_" class="anchor"></a><code><span class="keyword">val</span> atan_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``atan_ x`` is similar to ``atan`` but output is written to ``x``</p></dd></dl><dl><dt class="spec value" id="val-sinh_"><a href="#val-sinh_" class="anchor"></a><code><span class="keyword">val</span> sinh_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``sinh_ x`` is similar to ``sinh`` but output is written to ``x``</p></dd></dl><dl><dt class="spec value" id="val-cosh_"><a href="#val-cosh_" class="anchor"></a><code><span class="keyword">val</span> cosh_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``cosh_ x`` is similar to ``cosh`` but output is written to ``x``</p></dd></dl><dl><dt class="spec value" id="val-tanh_"><a href="#val-tanh_" class="anchor"></a><code><span class="keyword">val</span> tanh_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``tanh_ x`` is similar to ``tanh`` but output is written to ``x``</p></dd></dl><dl><dt class="spec value" id="val-asinh_"><a href="#val-asinh_" class="anchor"></a><code><span class="keyword">val</span> asinh_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``asinh_ x`` is similar to ``asinh`` but output is written to ``x``</p></dd></dl><dl><dt class="spec value" id="val-acosh_"><a href="#val-acosh_" class="anchor"></a><code><span class="keyword">val</span> acosh_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``acosh_ x`` is similar to ``acosh`` but output is written to ``x``</p></dd></dl><dl><dt class="spec value" id="val-atanh_"><a href="#val-atanh_" class="anchor"></a><code><span class="keyword">val</span> atanh_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``atanh_ x`` is similar to ``atanh`` but output is written to ``x``</p></dd></dl><dl><dt class="spec value" id="val-floor_"><a href="#val-floor_" class="anchor"></a><code><span class="keyword">val</span> floor_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``floor_ x`` is similar to ``floor`` but output is written to ``x``</p></dd></dl><dl><dt class="spec value" id="val-ceil_"><a href="#val-ceil_" class="anchor"></a><code><span class="keyword">val</span> ceil_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``ceil_ x`` is similar to ``ceil`` but output is written to ``x``</p></dd></dl><dl><dt class="spec value" id="val-round_"><a href="#val-round_" class="anchor"></a><code><span class="keyword">val</span> round_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``round_ x`` is similar to ``round`` but output is written to ``x``</p></dd></dl><dl><dt class="spec value" id="val-trunc_"><a href="#val-trunc_" class="anchor"></a><code><span class="keyword">val</span> trunc_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``trunc_ x`` is similar to ``trunc`` but output is written to ``x``</p></dd></dl><dl><dt class="spec value" id="val-fix_"><a href="#val-fix_" class="anchor"></a><code><span class="keyword">val</span> fix_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``fix_ x`` is similar to ``fix`` but output is written to ``x``</p></dd></dl><dl><dt class="spec value" id="val-erf_"><a href="#val-erf_" class="anchor"></a><code><span class="keyword">val</span> erf_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``erf_ x`` is similar to ``erf`` but output is written to ``x``</p></dd></dl><dl><dt class="spec value" id="val-erfc_"><a href="#val-erfc_" class="anchor"></a><code><span class="keyword">val</span> erfc_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``erfc_ x`` is similar to ``erfc`` but output is written to ``x``</p></dd></dl><dl><dt class="spec value" id="val-relu_"><a href="#val-relu_" class="anchor"></a><code><span class="keyword">val</span> relu_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``relu_ x`` is similar to ``relu`` but output is written to ``x``</p></dd></dl><dl><dt class="spec value" id="val-softplus_"><a href="#val-softplus_" class="anchor"></a><code><span class="keyword">val</span> softplus_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``softplus_ x`` is similar to ``softplus`` but output is written to ``x``</p></dd></dl><dl><dt class="spec value" id="val-softsign_"><a href="#val-softsign_" class="anchor"></a><code><span class="keyword">val</span> softsign_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``softsign_ x`` is similar to ``softsign`` but output is written to ``x``</p></dd></dl><dl><dt class="spec value" id="val-sigmoid_"><a href="#val-sigmoid_" class="anchor"></a><code><span class="keyword">val</span> sigmoid_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``sigmoid_ x`` is similar to ``sigmoid`` but output is written to ``x``</p></dd></dl><dl><dt class="spec value" id="val-softmax_"><a href="#val-softmax_" class="anchor"></a><code><span class="keyword">val</span> softmax_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span>?&#8288;axis:int</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``softmax_ x`` is similar to ``softmax`` but output is written to ``x``</p></dd></dl><dl><dt class="spec value" id="val-cumsum_"><a href="#val-cumsum_" class="anchor"></a><code><span class="keyword">val</span> cumsum_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span>?&#8288;axis:int</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``cumsum_ x`` is similar to ``cumsum`` but output is written to ``x``</p></dd></dl><dl><dt class="spec value" id="val-cumprod_"><a href="#val-cumprod_" class="anchor"></a><code><span class="keyword">val</span> cumprod_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span>?&#8288;axis:int</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``cumprod_ x`` is similar to ``cumprod`` but output is written to ``x``</p></dd></dl><dl><dt class="spec value" id="val-cummin_"><a href="#val-cummin_" class="anchor"></a><code><span class="keyword">val</span> cummin_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span>?&#8288;axis:int</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``cummin_ x`` is similar to ``cummin`` but output is written to ``x``</p></dd></dl><dl><dt class="spec value" id="val-cummax_"><a href="#val-cummax_" class="anchor"></a><code><span class="keyword">val</span> cummax_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span>?&#8288;axis:int</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``cummax_ x`` is similar to ``cummax`` but output is written to ``x``</p></dd></dl><dl><dt class="spec value" id="val-dropout_"><a href="#val-dropout_" class="anchor"></a><code><span class="keyword">val</span> dropout_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span>?&#8288;rate:float</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``dropout_ x`` is similar to ``dropout`` but output is written to ``x``</p></dd></dl><dl><dt class="spec value" id="val-elt_equal_"><a href="#val-elt_equal_" class="anchor"></a><code><span class="keyword">val</span> elt_equal_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``elt_equal_ x y`` is simiar to ``elt_equal`` function but the output is written to ``out``. You need to make sure ``out`` is big enough to hold the output result.</p></dd></dl><dl><dt class="spec value" id="val-elt_not_equal_"><a href="#val-elt_not_equal_" class="anchor"></a><code><span class="keyword">val</span> elt_not_equal_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``elt_not_equal_ x y`` is simiar to ``elt_not_equal`` function but the output is written to ``out``. You need to make sure ``out`` is big enough to hold the output result.</p></dd></dl><dl><dt class="spec value" id="val-elt_less_"><a href="#val-elt_less_" class="anchor"></a><code><span class="keyword">val</span> elt_less_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``elt_less_ x y`` is simiar to ``elt_less`` function but the output is written to ``out``. You need to make sure ``out`` is big enough to hold the output result.</p></dd></dl><dl><dt class="spec value" id="val-elt_greater_"><a href="#val-elt_greater_" class="anchor"></a><code><span class="keyword">val</span> elt_greater_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``elt_greater_ x y`` is simiar to ``elt_greater`` function but the output is written to ``out``. You need to make sure ``out`` is big enough to hold the output result.</p></dd></dl><dl><dt class="spec value" id="val-elt_less_equal_"><a href="#val-elt_less_equal_" class="anchor"></a><code><span class="keyword">val</span> elt_less_equal_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``elt_less_equal_ x y`` is simiar to ``elt_less_equal`` function but the output is written to ``out``. You need to make sure ``out`` is big enough to hold the output result.</p></dd></dl><dl><dt class="spec value" id="val-elt_greater_equal_"><a href="#val-elt_greater_equal_" class="anchor"></a><code><span class="keyword">val</span> elt_greater_equal_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``elt_greater_equal_ x y`` is simiar to ``elt_greater_equal`` function but the output is written to ``out``. You need to make sure ``out`` is big enough to hold the output result.</p></dd></dl><dl><dt class="spec value" id="val-elt_equal_scalar_"><a href="#val-elt_equal_scalar_" class="anchor"></a><code><span class="keyword">val</span> elt_equal_scalar_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``elt_equal_scalar_ x a`` is simiar to ``elt_equal_scalar`` function but the output is written to ``x``.</p></dd></dl><dl><dt class="spec value" id="val-elt_not_equal_scalar_"><a href="#val-elt_not_equal_scalar_" class="anchor"></a><code><span class="keyword">val</span> elt_not_equal_scalar_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``elt_not_equal_scalar_ x a`` is simiar to ``elt_not_equal_scalar`` function but the output is written to ``x``.</p></dd></dl><dl><dt class="spec value" id="val-elt_less_scalar_"><a href="#val-elt_less_scalar_" class="anchor"></a><code><span class="keyword">val</span> elt_less_scalar_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``elt_less_scalar_ x a`` is simiar to ``elt_less_scalar`` function but the output is written to ``x``.</p></dd></dl><dl><dt class="spec value" id="val-elt_greater_scalar_"><a href="#val-elt_greater_scalar_" class="anchor"></a><code><span class="keyword">val</span> elt_greater_scalar_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``elt_greater_scalar_ x a`` is simiar to ``elt_greater_scalar`` function but the output is written to ``x``.</p></dd></dl><dl><dt class="spec value" id="val-elt_less_equal_scalar_"><a href="#val-elt_less_equal_scalar_" class="anchor"></a><code><span class="keyword">val</span> elt_less_equal_scalar_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``elt_less_equal_scalar_ x a`` is simiar to ``elt_less_equal_scalar`` function but the output is written to ``x``.</p></dd></dl><dl><dt class="spec value" id="val-elt_greater_equal_scalar_"><a href="#val-elt_greater_equal_scalar_" class="anchor"></a><code><span class="keyword">val</span> elt_greater_equal_scalar_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``elt_greater_equal_scalar_ x a`` is simiar to ``elt_greater_equal_scalar`` function but the output is written to ``x``.</p></dd></dl><dl><dt class="spec value" id="val-conv1d_"><a href="#val-conv1d_" class="anchor"></a><code><span class="keyword">val</span> conv1d_ : <span>out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span>?&#8288;padding:<a href="../../../owl-base/Owl_types/index.html#type-padding">Owl_types.padding</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> unit</code></dt><dd><p>TODO</p></dd></dl><dl><dt class="spec value" id="val-conv2d_"><a href="#val-conv2d_" class="anchor"></a><code><span class="keyword">val</span> conv2d_ : <span>out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span>?&#8288;padding:<a href="../../../owl-base/Owl_types/index.html#type-padding">Owl_types.padding</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> unit</code></dt><dd><p>TODO</p></dd></dl><dl><dt class="spec value" id="val-conv3d_"><a href="#val-conv3d_" class="anchor"></a><code><span class="keyword">val</span> conv3d_ : <span>out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span>?&#8288;padding:<a href="../../../owl-base/Owl_types/index.html#type-padding">Owl_types.padding</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> unit</code></dt><dd><p>TODO</p></dd></dl><dl><dt class="spec value" id="val-dilated_conv1d_"><a href="#val-dilated_conv1d_" class="anchor"></a><code><span class="keyword">val</span> dilated_conv1d_ : <span>out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span>?&#8288;padding:<a href="../../../owl-base/Owl_types/index.html#type-padding">Owl_types.padding</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> unit</code></dt><dd><p>TODO</p></dd></dl><dl><dt class="spec value" id="val-dilated_conv2d_"><a href="#val-dilated_conv2d_" class="anchor"></a><code><span class="keyword">val</span> dilated_conv2d_ : <span>out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span>?&#8288;padding:<a href="../../../owl-base/Owl_types/index.html#type-padding">Owl_types.padding</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> unit</code></dt><dd><p>TODO</p></dd></dl><dl><dt class="spec value" id="val-dilated_conv3d_"><a href="#val-dilated_conv3d_" class="anchor"></a><code><span class="keyword">val</span> dilated_conv3d_ : <span>out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span>?&#8288;padding:<a href="../../../owl-base/Owl_types/index.html#type-padding">Owl_types.padding</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> unit</code></dt><dd><p>TODO</p></dd></dl><dl><dt class="spec value" id="val-transpose_conv1d_"><a href="#val-transpose_conv1d_" class="anchor"></a><code><span class="keyword">val</span> transpose_conv1d_ : <span>out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span>?&#8288;padding:<a href="../../../owl-base/Owl_types/index.html#type-padding">Owl_types.padding</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> unit</code></dt><dd><p>TODO</p></dd></dl><dl><dt class="spec value" id="val-transpose_conv2d_"><a href="#val-transpose_conv2d_" class="anchor"></a><code><span class="keyword">val</span> transpose_conv2d_ : <span>out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span>?&#8288;padding:<a href="../../../owl-base/Owl_types/index.html#type-padding">Owl_types.padding</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> unit</code></dt><dd><p>TODO</p></dd></dl><dl><dt class="spec value" id="val-transpose_conv3d_"><a href="#val-transpose_conv3d_" class="anchor"></a><code><span class="keyword">val</span> transpose_conv3d_ : <span>out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span>?&#8288;padding:<a href="../../../owl-base/Owl_types/index.html#type-padding">Owl_types.padding</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> unit</code></dt><dd><p>TODO</p></dd></dl><dl><dt class="spec value" id="val-max_pool1d_"><a href="#val-max_pool1d_" class="anchor"></a><code><span class="keyword">val</span> max_pool1d_ : <span>out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span>?&#8288;padding:<a href="../../../owl-base/Owl_types/index.html#type-padding">Owl_types.padding</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> unit</code></dt><dd><p>TODO</p></dd></dl><dl><dt class="spec value" id="val-max_pool2d_"><a href="#val-max_pool2d_" class="anchor"></a><code><span class="keyword">val</span> max_pool2d_ : <span>out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span>?&#8288;padding:<a href="../../../owl-base/Owl_types/index.html#type-padding">Owl_types.padding</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> unit</code></dt><dd><p>TODO</p></dd></dl><dl><dt class="spec value" id="val-max_pool3d_"><a href="#val-max_pool3d_" class="anchor"></a><code><span class="keyword">val</span> max_pool3d_ : <span>out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span>?&#8288;padding:<a href="../../../owl-base/Owl_types/index.html#type-padding">Owl_types.padding</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> unit</code></dt><dd><p>TODO</p></dd></dl><dl><dt class="spec value" id="val-avg_pool1d_"><a href="#val-avg_pool1d_" class="anchor"></a><code><span class="keyword">val</span> avg_pool1d_ : <span>out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span>?&#8288;padding:<a href="../../../owl-base/Owl_types/index.html#type-padding">Owl_types.padding</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> unit</code></dt><dd><p>TODO</p></dd></dl><dl><dt class="spec value" id="val-avg_pool2d_"><a href="#val-avg_pool2d_" class="anchor"></a><code><span class="keyword">val</span> avg_pool2d_ : <span>out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span>?&#8288;padding:<a href="../../../owl-base/Owl_types/index.html#type-padding">Owl_types.padding</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> unit</code></dt><dd><p>TODO</p></dd></dl><dl><dt class="spec value" id="val-avg_pool3d_"><a href="#val-avg_pool3d_" class="anchor"></a><code><span class="keyword">val</span> avg_pool3d_ : <span>out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span>?&#8288;padding:<a href="../../../owl-base/Owl_types/index.html#type-padding">Owl_types.padding</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> unit</code></dt><dd><p>TODO</p></dd></dl><dl><dt class="spec value" id="val-upsampling2d_"><a href="#val-upsampling2d_" class="anchor"></a><code><span class="keyword">val</span> upsampling2d_ : <span>out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> unit</code></dt><dd><p>TODO</p></dd></dl><dl><dt class="spec value" id="val-conv1d_backward_input_"><a href="#val-conv1d_backward_input_" class="anchor"></a><code><span class="keyword">val</span> conv1d_backward_input_ : <span>out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>TODO</p></dd></dl><dl><dt class="spec value" id="val-conv1d_backward_kernel_"><a href="#val-conv1d_backward_kernel_" class="anchor"></a><code><span class="keyword">val</span> conv1d_backward_kernel_ : <span>out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>TODO</p></dd></dl><dl><dt class="spec value" id="val-conv2d_backward_input_"><a href="#val-conv2d_backward_input_" class="anchor"></a><code><span class="keyword">val</span> conv2d_backward_input_ : <span>out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>TODO</p></dd></dl><dl><dt class="spec value" id="val-conv2d_backward_kernel_"><a href="#val-conv2d_backward_kernel_" class="anchor"></a><code><span class="keyword">val</span> conv2d_backward_kernel_ : <span>out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>TODO</p></dd></dl><dl><dt class="spec value" id="val-conv3d_backward_input_"><a href="#val-conv3d_backward_input_" class="anchor"></a><code><span class="keyword">val</span> conv3d_backward_input_ : <span>out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>TODO</p></dd></dl><dl><dt class="spec value" id="val-conv3d_backward_kernel_"><a href="#val-conv3d_backward_kernel_" class="anchor"></a><code><span class="keyword">val</span> conv3d_backward_kernel_ : <span>out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>TODO</p></dd></dl><dl><dt class="spec value" id="val-dilated_conv1d_backward_input_"><a href="#val-dilated_conv1d_backward_input_" class="anchor"></a><code><span class="keyword">val</span> dilated_conv1d_backward_input_ : <span>out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>TODO</p></dd></dl><dl><dt class="spec value" id="val-dilated_conv1d_backward_kernel_"><a href="#val-dilated_conv1d_backward_kernel_" class="anchor"></a><code><span class="keyword">val</span> dilated_conv1d_backward_kernel_ : <span>out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>TODO</p></dd></dl><dl><dt class="spec value" id="val-dilated_conv2d_backward_input_"><a href="#val-dilated_conv2d_backward_input_" class="anchor"></a><code><span class="keyword">val</span> dilated_conv2d_backward_input_ : <span>out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>TODO</p></dd></dl><dl><dt class="spec value" id="val-dilated_conv2d_backward_kernel_"><a href="#val-dilated_conv2d_backward_kernel_" class="anchor"></a><code><span class="keyword">val</span> dilated_conv2d_backward_kernel_ : <span>out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>TODO</p></dd></dl><dl><dt class="spec value" id="val-dilated_conv3d_backward_input_"><a href="#val-dilated_conv3d_backward_input_" class="anchor"></a><code><span class="keyword">val</span> dilated_conv3d_backward_input_ : <span>out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>TODO</p></dd></dl><dl><dt class="spec value" id="val-dilated_conv3d_backward_kernel_"><a href="#val-dilated_conv3d_backward_kernel_" class="anchor"></a><code><span class="keyword">val</span> dilated_conv3d_backward_kernel_ : <span>out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>TODO</p></dd></dl><dl><dt class="spec value" id="val-transpose_conv1d_backward_input_"><a href="#val-transpose_conv1d_backward_input_" class="anchor"></a><code><span class="keyword">val</span> transpose_conv1d_backward_input_ : <span>out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>TODO</p></dd></dl><dl><dt class="spec value" id="val-transpose_conv1d_backward_kernel_"><a href="#val-transpose_conv1d_backward_kernel_" class="anchor"></a><code><span class="keyword">val</span> transpose_conv1d_backward_kernel_ : <span>out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>TODO</p></dd></dl><dl><dt class="spec value" id="val-transpose_conv2d_backward_input_"><a href="#val-transpose_conv2d_backward_input_" class="anchor"></a><code><span class="keyword">val</span> transpose_conv2d_backward_input_ : <span>out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>TODO</p></dd></dl><dl><dt class="spec value" id="val-transpose_conv2d_backward_kernel_"><a href="#val-transpose_conv2d_backward_kernel_" class="anchor"></a><code><span class="keyword">val</span> transpose_conv2d_backward_kernel_ : <span>out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>TODO</p></dd></dl><dl><dt class="spec value" id="val-transpose_conv3d_backward_input_"><a href="#val-transpose_conv3d_backward_input_" class="anchor"></a><code><span class="keyword">val</span> transpose_conv3d_backward_input_ : <span>out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>TODO</p></dd></dl><dl><dt class="spec value" id="val-transpose_conv3d_backward_kernel_"><a href="#val-transpose_conv3d_backward_kernel_" class="anchor"></a><code><span class="keyword">val</span> transpose_conv3d_backward_kernel_ : <span>out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>TODO</p></dd></dl><dl><dt class="spec value" id="val-max_pool1d_backward_"><a href="#val-max_pool1d_backward_" class="anchor"></a><code><span class="keyword">val</span> max_pool1d_backward_ : <span>out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <a href="../../../owl-base/Owl_types/index.html#type-padding">Owl_types.padding</a> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>TODO</p></dd></dl><dl><dt class="spec value" id="val-max_pool2d_backward_"><a href="#val-max_pool2d_backward_" class="anchor"></a><code><span class="keyword">val</span> max_pool2d_backward_ : <span>out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <a href="../../../owl-base/Owl_types/index.html#type-padding">Owl_types.padding</a> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>TODO</p></dd></dl><dl><dt class="spec value" id="val-max_pool3d_backward_"><a href="#val-max_pool3d_backward_" class="anchor"></a><code><span class="keyword">val</span> max_pool3d_backward_ : <span>out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <a href="../../../owl-base/Owl_types/index.html#type-padding">Owl_types.padding</a> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>TODO</p></dd></dl><dl><dt class="spec value" id="val-avg_pool1d_backward_"><a href="#val-avg_pool1d_backward_" class="anchor"></a><code><span class="keyword">val</span> avg_pool1d_backward_ : <span>out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <a href="../../../owl-base/Owl_types/index.html#type-padding">Owl_types.padding</a> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>TODO</p></dd></dl><dl><dt class="spec value" id="val-avg_pool2d_backward_"><a href="#val-avg_pool2d_backward_" class="anchor"></a><code><span class="keyword">val</span> avg_pool2d_backward_ : <span>out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <a href="../../../owl-base/Owl_types/index.html#type-padding">Owl_types.padding</a> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>TODO</p></dd></dl><dl><dt class="spec value" id="val-avg_pool3d_backward_"><a href="#val-avg_pool3d_backward_" class="anchor"></a><code><span class="keyword">val</span> avg_pool3d_backward_ : <span>out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <a href="../../../owl-base/Owl_types/index.html#type-padding">Owl_types.padding</a> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>TODO</p></dd></dl><dl><dt class="spec value" id="val-upsampling2d_backward_"><a href="#val-upsampling2d_backward_" class="anchor"></a><code><span class="keyword">val</span> upsampling2d_backward_ : <span>out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>TODO</p></dd></dl><dl><dt class="spec value" id="val-fused_adagrad_"><a href="#val-fused_adagrad_" class="anchor"></a><code><span class="keyword">val</span> fused_adagrad_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span>rate:<span class="type-var">'a</span></span> <span>&#45;&gt;</span> <span>eps:<span class="type-var">'a</span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>TODO</p></dd></dl></section><section><header><h6 id="matrix-functions"><a href="#matrix-functions" class="anchor"></a>Matrix functions</h6></header><dl><dt class="spec type" id="type-area"><a href="#type-area" class="anchor"></a><code><span class="keyword">type</span> area</code><code> = </code><code>{</code><table class="record"><tr id="type-area.a" class="anchored"><td class="def field"><a href="#type-area.a" class="anchor"></a><code>a : int;</code></td></tr><tr id="type-area.b" class="anchored"><td class="def field"><a href="#type-area.b" class="anchor"></a><code>b : int;</code></td></tr><tr id="type-area.c" class="anchored"><td class="def field"><a href="#type-area.c" class="anchor"></a><code>c : int;</code></td></tr><tr id="type-area.d" class="anchored"><td class="def field"><a href="#type-area.d" class="anchor"></a><code>d : int;</code></td></tr></table><code>}</code></dt><dd><p>Refer to :doc:`owl_dense_matrix_generic`</p></dd></dl><dl><dt class="spec value" id="val-area"><a href="#val-area" class="anchor"></a><code><span class="keyword">val</span> area : int <span>&#45;&gt;</span> int <span>&#45;&gt;</span> int <span>&#45;&gt;</span> int <span>&#45;&gt;</span> <a href="index.html#type-area">area</a></code></dt><dd><p>Refer to :doc:`owl_dense_matrix_generic`</p></dd></dl><dl><dt class="spec value" id="val-copy_area_to"><a href="#val-copy_area_to" class="anchor"></a><code><span class="keyword">val</span> copy_area_to : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <a href="index.html#type-area">area</a> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <a href="index.html#type-area">area</a> <span>&#45;&gt;</span> unit</code></dt><dd><p>Refer to :doc:`owl_dense_matrix_generic`</p></dd></dl><dl><dt class="spec value" id="val-row_num"><a href="#val-row_num" class="anchor"></a><code><span class="keyword">val</span> row_num : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> int</code></dt><dd><p>Refer to :doc:`owl_dense_matrix_generic`</p></dd></dl><dl><dt class="spec value" id="val-col_num"><a href="#val-col_num" class="anchor"></a><code><span class="keyword">val</span> col_num : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> int</code></dt><dd><p>Refer to :doc:`owl_dense_matrix_generic`</p></dd></dl><dl><dt class="spec value" id="val-row"><a href="#val-row" class="anchor"></a><code><span class="keyword">val</span> row : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> int <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>Refer to :doc:`owl_dense_matrix_generic`</p></dd></dl><dl><dt class="spec value" id="val-col"><a href="#val-col" class="anchor"></a><code><span class="keyword">val</span> col : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> int <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>Refer to :doc:`owl_dense_matrix_generic`</p></dd></dl><dl><dt class="spec value" id="val-rows"><a href="#val-rows" class="anchor"></a><code><span class="keyword">val</span> rows : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>Refer to :doc:`owl_dense_matrix_generic`</p></dd></dl><dl><dt class="spec value" id="val-cols"><a href="#val-cols" class="anchor"></a><code><span class="keyword">val</span> cols : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>Refer to :doc:`owl_dense_matrix_generic`</p></dd></dl><dl><dt class="spec value" id="val-copy_row_to"><a href="#val-copy_row_to" class="anchor"></a><code><span class="keyword">val</span> copy_row_to : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> int <span>&#45;&gt;</span> unit</code></dt><dd><p>Refer to :doc:`owl_dense_matrix_generic`</p></dd></dl><dl><dt class="spec value" id="val-copy_col_to"><a href="#val-copy_col_to" class="anchor"></a><code><span class="keyword">val</span> copy_col_to : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> int <span>&#45;&gt;</span> unit</code></dt><dd><p>Refer to :doc:`owl_dense_matrix_generic`</p></dd></dl><dl><dt class="spec value" id="val-dot"><a href="#val-dot" class="anchor"></a><code><span class="keyword">val</span> dot : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>Refer to :doc:`owl_dense_matrix_generic`</p></dd></dl><dl><dt class="spec value" id="val-diag"><a href="#val-diag" class="anchor"></a><code><span class="keyword">val</span> diag : <span>?&#8288;k:int</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>Refer to :doc:`owl_dense_matrix_generic`</p></dd></dl><dl><dt class="spec value" id="val-trace"><a href="#val-trace" class="anchor"></a><code><span class="keyword">val</span> trace : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span></code></dt><dd><p>Refer to :doc:`owl_dense_matrix_generic`</p></dd></dl><dl><dt class="spec value" id="val-to_rows"><a href="#val-to_rows" class="anchor"></a><code><span class="keyword">val</span> to_rows : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> array</span></code></dt><dd><p>Refer to :doc:`owl_dense_matrix_generic`</p></dd></dl><dl><dt class="spec value" id="val-of_rows"><a href="#val-of_rows" class="anchor"></a><code><span class="keyword">val</span> of_rows : <span><span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> array</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>Refer to :doc:`owl_dense_matrix_generic`</p></dd></dl><dl><dt class="spec value" id="val-to_cols"><a href="#val-to_cols" class="anchor"></a><code><span class="keyword">val</span> to_cols : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> array</span></code></dt><dd><p>Refer to :doc:`owl_dense_matrix_generic`</p></dd></dl><dl><dt class="spec value" id="val-of_cols"><a href="#val-of_cols" class="anchor"></a><code><span class="keyword">val</span> of_cols : <span><span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> array</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>Refer to :doc:`owl_dense_matrix_generic`</p></dd></dl><dl><dt class="spec value" id="val-to_arrays"><a href="#val-to_arrays" class="anchor"></a><code><span class="keyword">val</span> to_arrays : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span><span class="type-var">'a</span> array</span> array</span></code></dt><dd><p>Refer to :doc:`owl_dense_matrix_generic`</p></dd></dl><dl><dt class="spec value" id="val-of_arrays"><a href="#val-of_arrays" class="anchor"></a><code><span class="keyword">val</span> of_arrays : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-kind">kind</a></span> <span>&#45;&gt;</span> <span><span><span class="type-var">'a</span> array</span> array</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>Refer to :doc:`owl_dense_matrix_generic`</p></dd></dl><dl><dt class="spec value" id="val-draw_rows"><a href="#val-draw_rows" class="anchor"></a><code><span class="keyword">val</span> draw_rows : <span>?&#8288;replacement:bool</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> int <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> * <span>int array</span></code></dt><dd><p>Refer to :doc:`owl_dense_matrix_generic`</p></dd></dl><dl><dt class="spec value" id="val-draw_cols"><a href="#val-draw_cols" class="anchor"></a><code><span class="keyword">val</span> draw_cols : <span>?&#8288;replacement:bool</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> int <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> * <span>int array</span></code></dt><dd><p>Refer to :doc:`owl_dense_matrix_generic`</p></dd></dl><dl><dt class="spec value" id="val-draw_rows2"><a href="#val-draw_rows2" class="anchor"></a><code><span class="keyword">val</span> draw_rows2 : <span>?&#8288;replacement:bool</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> int <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> * <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> * <span>int array</span></code></dt><dd><p>Refer to :doc:`owl_dense_matrix_generic`</p></dd></dl><dl><dt class="spec value" id="val-draw_cols2"><a href="#val-draw_cols2" class="anchor"></a><code><span class="keyword">val</span> draw_cols2 : <span>?&#8288;replacement:bool</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> int <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> * <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> * <span>int array</span></code></dt><dd><p>Refer to :doc:`owl_dense_matrix_generic`</p></dd></dl></section><section><header><h6 id="helper-functions"><a href="#helper-functions" class="anchor"></a>Helper functions</h6></header><dl><dt class="spec value" id="val-float_to_elt"><a href="#val-float_to_elt" class="anchor"></a><code><span class="keyword">val</span> float_to_elt : <span class="type-var">'a</span> <span>&#45;&gt;</span> <span class="type-var">'a</span></code></dt><dd><p>Identity function to deal with the type conversion required by other functors.</p></dd></dl><dl><dt class="spec value" id="val-elt_to_float"><a href="#val-elt_to_float" class="anchor"></a><code><span class="keyword">val</span> elt_to_float : <span class="type-var">'a</span> <span>&#45;&gt;</span> <span class="type-var">'a</span></code></dt><dd><p>Identity function to deal with the type conversion required by other functors.</p></dd></dl></section></details></div></div></div><div><div class="spec include"><div class="doc"><details open="open"><summary><span class="def"><code><span class="keyword">include</span> <a href="../index.html#module-Operator">Operator</a></code></span></summary><div><div class="spec include"><div class="doc"><details open="open"><summary><span class="def"><code><span class="keyword">include</span> <span class="keyword">sig</span> ... <span class="keyword">end</span></code></span></summary><dl><dt class="spec value" id="val-(+)"><a href="#val-(+)" class="anchor"></a><code><span class="keyword">val</span> (+) : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-t">Owl_dense_ndarray_generic.t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-t">Owl_dense_ndarray_generic.t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-t">Owl_dense_ndarray_generic.t</a></span></code></dt><dt class="spec value" id="val-(-)"><a href="#val-(-)" class="anchor"></a><code><span class="keyword">val</span> (-) : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-t">Owl_dense_ndarray_generic.t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-t">Owl_dense_ndarray_generic.t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-t">Owl_dense_ndarray_generic.t</a></span></code></dt><dt class="spec value" id="val-(*)"><a href="#val-(*)" class="anchor"></a><code><span class="keyword">val</span> (*) : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-t">Owl_dense_ndarray_generic.t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-t">Owl_dense_ndarray_generic.t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-t">Owl_dense_ndarray_generic.t</a></span></code></dt><dt class="spec value" id="val-(/)"><a href="#val-(/)" class="anchor"></a><code><span class="keyword">val</span> (/) : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-t">Owl_dense_ndarray_generic.t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-t">Owl_dense_ndarray_generic.t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-t">Owl_dense_ndarray_generic.t</a></span></code></dt><dt class="spec value" id="val-(+$)"><a href="#val-(+$)" class="anchor"></a><code><span class="keyword">val</span> (+$) : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-t">Owl_dense_ndarray_generic.t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-t">Owl_dense_ndarray_generic.t</a></span></code></dt><dt class="spec value" id="val-(-$)"><a href="#val-(-$)" class="anchor"></a><code><span class="keyword">val</span> (-$) : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-t">Owl_dense_ndarray_generic.t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-t">Owl_dense_ndarray_generic.t</a></span></code></dt><dt class="spec value" id="val-(*$)"><a href="#val-(*$)" class="anchor"></a><code><span class="keyword">val</span> (*$) : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-t">Owl_dense_ndarray_generic.t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-t">Owl_dense_ndarray_generic.t</a></span></code></dt><dt class="spec value" id="val-(/$)"><a href="#val-(/$)" class="anchor"></a><code><span class="keyword">val</span> (/$) : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-t">Owl_dense_ndarray_generic.t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-t">Owl_dense_ndarray_generic.t</a></span></code></dt><dt class="spec value" id="val-($+)"><a href="#val-($+)" class="anchor"></a><code><span class="keyword">val</span> ($+) : <span class="type-var">'a</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-t">Owl_dense_ndarray_generic.t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-t">Owl_dense_ndarray_generic.t</a></span></code></dt><dt class="spec value" id="val-($-)"><a href="#val-($-)" class="anchor"></a><code><span class="keyword">val</span> ($-) : <span class="type-var">'a</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-t">Owl_dense_ndarray_generic.t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-t">Owl_dense_ndarray_generic.t</a></span></code></dt><dt class="spec value" id="val-($*)"><a href="#val-($*)" class="anchor"></a><code><span class="keyword">val</span> ($*) : <span class="type-var">'a</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-t">Owl_dense_ndarray_generic.t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-t">Owl_dense_ndarray_generic.t</a></span></code></dt><dt class="spec value" id="val-($/)"><a href="#val-($/)" class="anchor"></a><code><span class="keyword">val</span> ($/) : <span class="type-var">'a</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-t">Owl_dense_ndarray_generic.t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-t">Owl_dense_ndarray_generic.t</a></span></code></dt><dt class="spec value" id="val-(=)"><a href="#val-(=)" class="anchor"></a><code><span class="keyword">val</span> (=) : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-t">Owl_dense_ndarray_generic.t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-t">Owl_dense_ndarray_generic.t</a></span> <span>&#45;&gt;</span> bool</code></dt><dt class="spec value" id="val-(!=)"><a href="#val-(!=)" class="anchor"></a><code><span class="keyword">val</span> (!=) : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-t">Owl_dense_ndarray_generic.t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-t">Owl_dense_ndarray_generic.t</a></span> <span>&#45;&gt;</span> bool</code></dt><dt class="spec value" id="val-(&lt;&gt;)"><a href="#val-(&lt;&gt;)" class="anchor"></a><code><span class="keyword">val</span> (&lt;&gt;) : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-t">Owl_dense_ndarray_generic.t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-t">Owl_dense_ndarray_generic.t</a></span> <span>&#45;&gt;</span> bool</code></dt><dt class="spec value" id="val-(&gt;)"><a href="#val-(&gt;)" class="anchor"></a><code><span class="keyword">val</span> (&gt;) : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-t">Owl_dense_ndarray_generic.t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-t">Owl_dense_ndarray_generic.t</a></span> <span>&#45;&gt;</span> bool</code></dt><dt class="spec value" id="val-(&lt;)"><a href="#val-(&lt;)" class="anchor"></a><code><span class="keyword">val</span> (&lt;) : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-t">Owl_dense_ndarray_generic.t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-t">Owl_dense_ndarray_generic.t</a></span> <span>&#45;&gt;</span> bool</code></dt><dt class="spec value" id="val-(&gt;=)"><a href="#val-(&gt;=)" class="anchor"></a><code><span class="keyword">val</span> (&gt;=) : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-t">Owl_dense_ndarray_generic.t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-t">Owl_dense_ndarray_generic.t</a></span> <span>&#45;&gt;</span> bool</code></dt><dt class="spec value" id="val-(&lt;=)"><a href="#val-(&lt;=)" class="anchor"></a><code><span class="keyword">val</span> (&lt;=) : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-t">Owl_dense_ndarray_generic.t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-t">Owl_dense_ndarray_generic.t</a></span> <span>&#45;&gt;</span> bool</code></dt></dl></details></div></div></div><div><div class="spec include"><div class="doc"><details open="open"><summary><span class="def"><code><span class="keyword">include</span> <span class="keyword">sig</span> ... <span class="keyword">end</span></code></span></summary><dl><dt class="spec value" id="val-(=$)"><a href="#val-(=$)" class="anchor"></a><code><span class="keyword">val</span> (=$) : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-t">Owl_dense_ndarray_generic.t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> bool</code></dt><dt class="spec value" id="val-(!=$)"><a href="#val-(!=$)" class="anchor"></a><code><span class="keyword">val</span> (!=$) : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-t">Owl_dense_ndarray_generic.t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> bool</code></dt><dt class="spec value" id="val-(&lt;&gt;$)"><a href="#val-(&lt;&gt;$)" class="anchor"></a><code><span class="keyword">val</span> (&lt;&gt;$) : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-t">Owl_dense_ndarray_generic.t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> bool</code></dt><dt class="spec value" id="val-(&lt;$)"><a href="#val-(&lt;$)" class="anchor"></a><code><span class="keyword">val</span> (&lt;$) : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-t">Owl_dense_ndarray_generic.t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> bool</code></dt><dt class="spec value" id="val-(&gt;$)"><a href="#val-(&gt;$)" class="anchor"></a><code><span class="keyword">val</span> (&gt;$) : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-t">Owl_dense_ndarray_generic.t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> bool</code></dt><dt class="spec value" id="val-(&lt;=$)"><a href="#val-(&lt;=$)" class="anchor"></a><code><span class="keyword">val</span> (&lt;=$) : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-t">Owl_dense_ndarray_generic.t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> bool</code></dt><dt class="spec value" id="val-(&gt;=$)"><a href="#val-(&gt;=$)" class="anchor"></a><code><span class="keyword">val</span> (&gt;=$) : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-t">Owl_dense_ndarray_generic.t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> bool</code></dt><dt class="spec value" id="val-(=.)"><a href="#val-(=.)" class="anchor"></a><code><span class="keyword">val</span> (=.) : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-t">Owl_dense_ndarray_generic.t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-t">Owl_dense_ndarray_generic.t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-t">Owl_dense_ndarray_generic.t</a></span></code></dt><dt class="spec value" id="val-(!=.)"><a href="#val-(!=.)" class="anchor"></a><code><span class="keyword">val</span> (!=.) : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-t">Owl_dense_ndarray_generic.t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-t">Owl_dense_ndarray_generic.t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-t">Owl_dense_ndarray_generic.t</a></span></code></dt><dt class="spec value" id="val-(&lt;&gt;.)"><a href="#val-(&lt;&gt;.)" class="anchor"></a><code><span class="keyword">val</span> (&lt;&gt;.) : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-t">Owl_dense_ndarray_generic.t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-t">Owl_dense_ndarray_generic.t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-t">Owl_dense_ndarray_generic.t</a></span></code></dt><dt class="spec value" id="val-(&lt;.)"><a href="#val-(&lt;.)" class="anchor"></a><code><span class="keyword">val</span> (&lt;.) : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-t">Owl_dense_ndarray_generic.t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-t">Owl_dense_ndarray_generic.t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-t">Owl_dense_ndarray_generic.t</a></span></code></dt><dt class="spec value" id="val-(&gt;.)"><a href="#val-(&gt;.)" class="anchor"></a><code><span class="keyword">val</span> (&gt;.) : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-t">Owl_dense_ndarray_generic.t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-t">Owl_dense_ndarray_generic.t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-t">Owl_dense_ndarray_generic.t</a></span></code></dt><dt class="spec value" id="val-(&lt;=.)"><a href="#val-(&lt;=.)" class="anchor"></a><code><span class="keyword">val</span> (&lt;=.) : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-t">Owl_dense_ndarray_generic.t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-t">Owl_dense_ndarray_generic.t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-t">Owl_dense_ndarray_generic.t</a></span></code></dt><dt class="spec value" id="val-(&gt;=.)"><a href="#val-(&gt;=.)" class="anchor"></a><code><span class="keyword">val</span> (&gt;=.) : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-t">Owl_dense_ndarray_generic.t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-t">Owl_dense_ndarray_generic.t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-t">Owl_dense_ndarray_generic.t</a></span></code></dt><dt class="spec value" id="val-(=.$)"><a href="#val-(=.$)" class="anchor"></a><code><span class="keyword">val</span> (=.$) : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-t">Owl_dense_ndarray_generic.t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-t">Owl_dense_ndarray_generic.t</a></span></code></dt><dt class="spec value" id="val-(!=.$)"><a href="#val-(!=.$)" class="anchor"></a><code><span class="keyword">val</span> (!=.$) : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-t">Owl_dense_ndarray_generic.t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-t">Owl_dense_ndarray_generic.t</a></span></code></dt><dt class="spec value" id="val-(&lt;&gt;.$)"><a href="#val-(&lt;&gt;.$)" class="anchor"></a><code><span class="keyword">val</span> (&lt;&gt;.$) : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-t">Owl_dense_ndarray_generic.t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-t">Owl_dense_ndarray_generic.t</a></span></code></dt><dt class="spec value" id="val-(&lt;.$)"><a href="#val-(&lt;.$)" class="anchor"></a><code><span class="keyword">val</span> (&lt;.$) : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-t">Owl_dense_ndarray_generic.t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-t">Owl_dense_ndarray_generic.t</a></span></code></dt><dt class="spec value" id="val-(&gt;.$)"><a href="#val-(&gt;.$)" class="anchor"></a><code><span class="keyword">val</span> (&gt;.$) : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-t">Owl_dense_ndarray_generic.t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-t">Owl_dense_ndarray_generic.t</a></span></code></dt><dt class="spec value" id="val-(&lt;=.$)"><a href="#val-(&lt;=.$)" class="anchor"></a><code><span class="keyword">val</span> (&lt;=.$) : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-t">Owl_dense_ndarray_generic.t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-t">Owl_dense_ndarray_generic.t</a></span></code></dt><dt class="spec value" id="val-(&gt;=.$)"><a href="#val-(&gt;=.$)" class="anchor"></a><code><span class="keyword">val</span> (&gt;=.$) : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-t">Owl_dense_ndarray_generic.t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-t">Owl_dense_ndarray_generic.t</a></span></code></dt><dt class="spec value" id="val-(=~)"><a href="#val-(=~)" class="anchor"></a><code><span class="keyword">val</span> (=~) : <span>?&#8288;eps:float</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-t">Owl_dense_ndarray_generic.t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-t">Owl_dense_ndarray_generic.t</a></span> <span>&#45;&gt;</span> bool</code></dt><dt class="spec value" id="val-(=~$)"><a href="#val-(=~$)" class="anchor"></a><code><span class="keyword">val</span> (=~$) : <span>?&#8288;eps:float</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-t">Owl_dense_ndarray_generic.t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> bool</code></dt><dt class="spec value" id="val-(=~.)"><a href="#val-(=~.)" class="anchor"></a><code><span class="keyword">val</span> (=~.) : <span>?&#8288;eps:float</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-t">Owl_dense_ndarray_generic.t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-t">Owl_dense_ndarray_generic.t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-t">Owl_dense_ndarray_generic.t</a></span></code></dt><dt class="spec value" id="val-(=~.$)"><a href="#val-(=~.$)" class="anchor"></a><code><span class="keyword">val</span> (=~.$) : <span>?&#8288;eps:float</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-t">Owl_dense_ndarray_generic.t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-t">Owl_dense_ndarray_generic.t</a></span></code></dt><dt class="spec value" id="val-(%)"><a href="#val-(%)" class="anchor"></a><code><span class="keyword">val</span> (%) : <span><span>(float, <span class="type-var">'a</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-t">Owl_dense_ndarray_generic.t</a></span> <span>&#45;&gt;</span> <span><span>(float, <span class="type-var">'a</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-t">Owl_dense_ndarray_generic.t</a></span> <span>&#45;&gt;</span> <span><span>(float, <span class="type-var">'a</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-t">Owl_dense_ndarray_generic.t</a></span></code></dt><dt class="spec value" id="val-(%$)"><a href="#val-(%$)" class="anchor"></a><code><span class="keyword">val</span> (%$) : <span><span>(float, <span class="type-var">'a</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-t">Owl_dense_ndarray_generic.t</a></span> <span>&#45;&gt;</span> float <span>&#45;&gt;</span> <span><span>(float, <span class="type-var">'a</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-t">Owl_dense_ndarray_generic.t</a></span></code></dt><dt class="spec value" id="val-(**)"><a href="#val-(**)" class="anchor"></a><code><span class="keyword">val</span> (**) : <span><span>(float, <span class="type-var">'a</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-t">Owl_dense_ndarray_generic.t</a></span> <span>&#45;&gt;</span> <span><span>(float, <span class="type-var">'a</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-t">Owl_dense_ndarray_generic.t</a></span> <span>&#45;&gt;</span> <span><span>(float, <span class="type-var">'a</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-t">Owl_dense_ndarray_generic.t</a></span></code></dt><dt class="spec value" id="val-($**)"><a href="#val-($**)" class="anchor"></a><code><span class="keyword">val</span> ($**) : float <span>&#45;&gt;</span> <span><span>(float, <span class="type-var">'a</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-t">Owl_dense_ndarray_generic.t</a></span> <span>&#45;&gt;</span> <span><span>(float, <span class="type-var">'a</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-t">Owl_dense_ndarray_generic.t</a></span></code></dt><dt class="spec value" id="val-(**$)"><a href="#val-(**$)" class="anchor"></a><code><span class="keyword">val</span> (**$) : <span><span>(float, <span class="type-var">'a</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-t">Owl_dense_ndarray_generic.t</a></span> <span>&#45;&gt;</span> float <span>&#45;&gt;</span> <span><span>(float, <span class="type-var">'a</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-t">Owl_dense_ndarray_generic.t</a></span></code></dt><dt class="spec value" id="val-(+=)"><a href="#val-(+=)" class="anchor"></a><code><span class="keyword">val</span> (+=) : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-t">Owl_dense_ndarray_generic.t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-t">Owl_dense_ndarray_generic.t</a></span> <span>&#45;&gt;</span> unit</code></dt><dt class="spec value" id="val-(-=)"><a href="#val-(-=)" class="anchor"></a><code><span class="keyword">val</span> (-=) : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-t">Owl_dense_ndarray_generic.t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-t">Owl_dense_ndarray_generic.t</a></span> <span>&#45;&gt;</span> unit</code></dt><dt class="spec value" id="val-(*=)"><a href="#val-(*=)" class="anchor"></a><code><span class="keyword">val</span> (*=) : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-t">Owl_dense_ndarray_generic.t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-t">Owl_dense_ndarray_generic.t</a></span> <span>&#45;&gt;</span> unit</code></dt><dt class="spec value" id="val-(/=)"><a href="#val-(/=)" class="anchor"></a><code><span class="keyword">val</span> (/=) : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-t">Owl_dense_ndarray_generic.t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-t">Owl_dense_ndarray_generic.t</a></span> <span>&#45;&gt;</span> unit</code></dt><dt class="spec value" id="val-(+$=)"><a href="#val-(+$=)" class="anchor"></a><code><span class="keyword">val</span> (+$=) : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-t">Owl_dense_ndarray_generic.t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> unit</code></dt><dt class="spec value" id="val-(-$=)"><a href="#val-(-$=)" class="anchor"></a><code><span class="keyword">val</span> (-$=) : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-t">Owl_dense_ndarray_generic.t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> unit</code></dt><dt class="spec value" id="val-(*$=)"><a href="#val-(*$=)" class="anchor"></a><code><span class="keyword">val</span> (*$=) : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-t">Owl_dense_ndarray_generic.t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> unit</code></dt><dt class="spec value" id="val-(/$=)"><a href="#val-(/$=)" class="anchor"></a><code><span class="keyword">val</span> (/$=) : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-t">Owl_dense_ndarray_generic.t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> unit</code></dt><dt class="spec value" id="val-(@=)"><a href="#val-(@=)" class="anchor"></a><code><span class="keyword">val</span> (@=) : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-t">Owl_dense_ndarray_generic.t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-t">Owl_dense_ndarray_generic.t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-t">Owl_dense_ndarray_generic.t</a></span></code></dt><dt class="spec value" id="val-(@||)"><a href="#val-(@||)" class="anchor"></a><code><span class="keyword">val</span> (@||) : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-t">Owl_dense_ndarray_generic.t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-t">Owl_dense_ndarray_generic.t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-t">Owl_dense_ndarray_generic.t</a></span></code></dt><dt class="spec value" id="val-(.!{})"><a href="#val-(.!{})" class="anchor"></a><code><span class="keyword">val</span> (.!{}) : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-t">Owl_dense_ndarray_generic.t</a></span> <span>&#45;&gt;</span> <span><a href="../../../owl-base/Owl_types/index.html#type-index">Owl_types.index</a> list</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-t">Owl_dense_ndarray_generic.t</a></span></code></dt><dt class="spec value" id="val-(.!{}&lt;-)"><a href="#val-(.!{}&lt;-)" class="anchor"></a><code><span class="keyword">val</span> (.!{}&lt;-) : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-t">Owl_dense_ndarray_generic.t</a></span> <span>&#45;&gt;</span> <span><a href="../../../owl-base/Owl_types/index.html#type-index">Owl_types.index</a> list</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-t">Owl_dense_ndarray_generic.t</a></span> <span>&#45;&gt;</span> unit</code></dt><dt class="spec value" id="val-(.${})"><a href="#val-(.${})" class="anchor"></a><code><span class="keyword">val</span> (.${}) : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-t">Owl_dense_ndarray_generic.t</a></span> <span>&#45;&gt;</span> <span><span>int list</span> list</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-t">Owl_dense_ndarray_generic.t</a></span></code></dt><dt class="spec value" id="val-(.${}&lt;-)"><a href="#val-(.${}&lt;-)" class="anchor"></a><code><span class="keyword">val</span> (.${}&lt;-) : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-t">Owl_dense_ndarray_generic.t</a></span> <span>&#45;&gt;</span> <span><span>int list</span> list</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-t">Owl_dense_ndarray_generic.t</a></span> <span>&#45;&gt;</span> unit</code></dt></dl></details></div></div></div><div><div class="spec include"><div class="doc"><details open="open"><summary><span class="def"><code><span class="keyword">include</span> <span class="keyword">sig</span> ... <span class="keyword">end</span></code></span></summary><dl><dt class="spec value" id="val-(.%{})"><a href="#val-(.%{})" class="anchor"></a><code><span class="keyword">val</span> (.%{}) : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-t">Owl_dense_ndarray_generic.t</a></span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span class="type-var">'a</span></code></dt><dt class="spec value" id="val-(.%{}&lt;-)"><a href="#val-(.%{}&lt;-)" class="anchor"></a><code><span class="keyword">val</span> (.%{}&lt;-) : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-t">Owl_dense_ndarray_generic.t</a></span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> unit</code></dt></dl></details></div></div></div></details></div></div></div><dl><dt class="spec value" id="val-mpow"><a href="#val-mpow" class="anchor"></a><code><span class="keyword">val</span> mpow : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_linalg_generic/index.html#type-t">Owl_linalg_generic.t</a></span> <span>&#45;&gt;</span> float <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_linalg_generic/index.html#type-t">Owl_linalg_generic.t</a></span></code></dt></dl></div></body></html>